mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 15:18:01 +00:00
16 KiB
16 KiB
TIL
Today I Learned
A collection of concise write-ups on small things I learn day to day across a variety of languages and technologies. These are things that don't really warrant a full blog post. These are mostly things I learn by pairing with smart people at Hashrocket.
Categories
clojure
- Evaluate One Liners With lein-exec
- Expanding Macros
- Open JavaDocs
- Quick Clojure Docs
- Reductions
- Set Max Heap Size
- Specify the Directory of a Shell Command
- Splitting On Whitespace
- Swap Two Items in a Vector
- Type of Anything
- When Overflow Is Desired
devops
- Check The Status of All Services
- Check The Syntax Of nginx Files
- Push Non-master Branch To Heroku
- Reload The nginx Configuration
- Running Out Of inode Space
- Wipe A Heroku Postgres Database
git
- Accessing a Lost Commit
- Amend Author Of Previous Commit
- Caching Credentials
- Checkout Old Version Of A File
- Checkout Previous Branch
- Clean Out All Local Branches
- Clean Up Old Remote Tracking References
- Delete All Untracked Files
- Determine The Hash Id For A Blob
- Dry Runs in Git
- Excluding Files Locally
- Grab A Single File From A Stash
- Ignore Changes To A Tracked File
- Intent To Add
- Last Commit A File Appeared In
- List Filenames Without The Diffs
- List Untracked Files
- Renaming A Branch
- Single Key Presses in Interactive Mode
- Staging Changes Within Vim
- Staging Stashes Interactively
- Stashing Only Unstaged Changes
- Stashing Untracked Files
- Untrack A File Without Deleting It
- Verbose Commit Message
- Whitespace Warnings
go
javascript
linux
mac
postgres
- Auto Expanded Display
- Checking The Type Of A Value
- Configure The Timezone
- Count Records By Type
- Default Schema
- Defining Arrays
- Edit Existing Functions
- Extracting Nested JSON Data
- Find The Data Directory
- Fizzbuzz With Common Table Expressions
- Generate A UUID
- Generate Series Of Numbers
- Getting A Slice Of An Array
- Insert Just The Defaults
- Integers In Postgres
- Intervals Of Time By Week
- Limit Execution Time Of Statements
- List All Columns Of A Specific Type
- List All Versions Of A Function
- List Database Users
- Restart A Sequence
- Send A Command To psql
- Special Math Operators
- String Contains Another String
- Temporarily Disable Triggers
- Temporary Tables
- Timestamp Functions
- Toggling The Pager In PSQL
- Truncate All Rows
- Turning Timing On
- Types By Category
- Use Argument Indexes
- Using Intervals To Offset Time
- Who Is The Current User
- Word Count for a Column
rails
- All or Nothing Database Transactions
- Attribute Getter without the Recursion
- Attribute Was
- Autosave False On ActiveRecord Associations
- Capybara Page Status Code
- Code Statistics For An Application
- Conditional Class Selectors in Haml
- Creating Records of Has_One Associations
- Hash Slicing
- Ignore Poltergeist JavaScript Errors
- Pretend Generations
- Retrieve An Object If It Exists
- Select Value For SQL Counts
- Show Pending Migrations
ruby
- Are They All True?
- Assoc For Hashes
- Colorful Output With MiniTest
- Comparing Class Hierarchy Relationships
- Construct A Constant From A String
- Create an Array of Stringed Numbers
- Destructuring Arrays In Blocks
- Disassemble Some Codes
- Double Splat To Merge Hashes
- Editing Code In Pry
- Evaluating One-Off Commands
- FactoryGirl Sequences
- Finding The Source of Ruby Methods
- Invoking Rake Tasks Multiple Times
- Last Raised Exception In The Call Stack
- Limit Split
- Listing Local Variables
- Next And Previous Floats
- Override The Initial Sequence Value
- Parallel Bundle Install
- Passing Arbitrary Methods As Blocks
- Passing Arguments To A Rake Task
- Percent Notation
- Question Mark Operator
- Rake Only Lists Tasks With Descriptions
- Replace The Current Process With An External Command
- Set RVM Default Ruby
- Squeeze Out The Extra Space
- Summing Collections
- Uncaught Exceptions In Pry
undef_methodAnd The Inheritance Hierarchy- Zero Padding
tmux
- Adjusting Window Pane Size
- Create A Named tmux Session
- Cycle Through Layouts
- List All Key Bindings
- Organizing Windows
- Pane Killer
- Reclaiming The Entire Window
- Swap Split Panes
- tmux in your tmux
unix
- All The Environment Variables
- Cat A File With Line Numbers
- Check If A Port Is In Use
- Clear The Screen
- Create A File Descriptor with Process Substitution
- Do Not Overwrite Existing Files
- File Type Info With File
- Find Newer Files
- Global Substitution On The Previous Command
- Hexdump A Compiled File
- Kill Everything Running On A Certain Port
- Killing A Frozen SSH Session
- List All The Say Voices
- List All Users
- Only Show The Matches
- Repeat Yourself
- Saying Yes
- Search History
- Search Man Page Descriptions
- Securely Remove Files
- SSH With Port Forwarding
- Switch Versions of a Brew Formula
- Watch The Difference
- Watch This Run Repeatedly
- Where Are The Binaries?
vim
- Absolute And Relative Line Numbers
- Add Custom Dictionary Words
- Alternate Files With vim-rails
- Amend Commits With Fugitive
- Beginning And End Of Previous Change
- The Black Hole Register
- Buffer Time Travel
- Case-Aware Substitution With vim-abolish
- Case-Insensitive Substitution
- Center The Cursor
- Check Your Current Color Scheme
- Close the Current Buffer
- Coerce The Current Filetype
- Count the Number of Matches
- Create A New Directory In netrw
- Create A New File In A New Directory
- Delete Every Other Line
- Delete Lines That Match A Pattern
- Deleting Directories Of Files From netrw
- Edges Of The Selection
- End Of The Word
- Filter Lines Through An External Program
- Format Long Lines To Text Width
- Generate and Edit Rails Migration
- Head of File Name
- Help For Non-Normal Mode Features
- Horizontal to Vertical and Back Again
- Incremental Searching
- Interactive Buffer List
- Joining Lines Together
- Jump To Matching Pair
- Jump To The Next Misspelling
- List All Buffers
- List Of Plugins
- Match The Beginning And End Of Words
- Marks Across Vim Sessions
- Moving To A Specific Line
- Navigating By Blank Lines
- NETRW Listing Styles
- Next Modified Buffer
- Open an Unnamed Buffer
- Opening a URL
- Preventing Typos with Abbreviations
- Previous Buffer
- Previous Visual Selection
- Quick File Info
- Quick Man Pages
- Quick Quickfix List Navigation
- Re-indenting Your Code
- Rename Current File
- Repeat The Previous Change
- Repeating Characters
- Replace A Character
- Scrolling Relative to the Window
- Searching For Hex Digits
- Set End Of Line Markers
- Set Your Color Scheme
- Split Different
- Swap Occurrences Of Two Words
- Swapping Split Windows
- Tabs To Spaces
- The Vim Info File
- Verbose Commits With Fugitive
- View Commit History of a File
- Viewing Man Pages with man.vim
- Vim Without The Extras
- Whole Line Auto-Completion
- Wrap With Some Room
About
I shamelessly stole this idea from thoughtbot/til.
Other TIL Collections
License
© 2015 Josh Branchaud
This repository is licensed under the MIT license. See LICENSE for
details.