Skip to content

Instantly share code, notes, and snippets.

View lesschar's full-sized avatar
🎯
Focusing

lesschar

🎯
Focusing
View GitHub Profile
# on mac: brew install tree
# on linux: yum install tree
## the XML output is 5 directories deep and filtering any folder name with "tmp" in it
tree -d -L 5 -X -I tmp /Users/karl/Dropbox/CodeNinja/GitHub | sed 's/directory/node/g'| sed 's/name/TEXT/g' | sed 's/tree/map/g' | sed '$d' | sed '$d' | sed '$d'| sed "1d" | sed 's/report/\/map/g' | sed 's/<map>/<map version="1.0.1">/g' > /Users/karl/Dropbox/CodeNinja/GitHub/Gitmap.mm
## to filter multiple folders do the following
tree -L 7 -I "tmp|node_modules|bower_components"
@lesschar
lesschar / bat
Created November 2, 2015 01:24
windows autorun.bat
@echo off
doskey ls=dir /b $*
doskey ll=dir $*
doskey cat=type $*
doskey ..=cd..
doskey grep=find "$1" $2
doskey mv=ren $*
doskey rm=del $*
doskey dt=ruby F:\sync\ruby\dt.rb $1
doskey yd=python F:\sync\python\youdao.py $1
@lesschar
lesschar / gdbinit
Last active September 9, 2015 05:50 — forked from CocoaBeans/gdbinit
.gdbinit - A user-friendly gdb configuration file
# INSTALL INSTRUCTIONS: save as ~/.gdbinit
#
# DESCRIPTION: A user-friendly gdb configuration file.
#
# REVISION : 7.3 (16/04/2010)
#
# CONTRIBUTORS: mammon_, elaine, pusillus, mong, zhang le, l0kit,
# truthix the cyberpunk, fG!, gln
#
# FEEDBACK: https://www.reverse-engineering.net
@lesschar
lesschar / solarized_setup.js
Last active August 29, 2015 14:27 — forked from baldwicc/solarized_setup.js
Solarized Light and Solarized Dark for Chrome Secure Shell (nassh), with fonts
/**
* STEP 1: Setup
* - Open Chrome Secure Shell settings
* - Open JS Console (CTRL+SHIFT+J)
* - Copy and paste the following:
*/
var s7d_colours = {
'base03': '#002b36',
'base02': '#073642',
'base01': '#586e75',
Generated: Wed, 28 Jan 2015 05:59:39 GMT
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.16 Safari/537.36
Extensions: 53
- Context v0.412: https://chrome.google.com/webstore/detail/aalnjolghjkkogicompabhhbbkljnlka
Sort extensions into groups and easily switch between them.
- 1Password: Password Manager and Secure Wallet v4.2.5.90: https://chrome.google.com/webstore/detail/aomjjhallfgjeglblehebfpbcfeobpgk
1Password extension for Google Chrome.
- Anything to QRcode v1.0.5: https://chrome.google.com/webstore/detail/calkaljlpglgogjfcidhlmmlgjnpmnmf
Anything to QRcode ( absolute locally and offline, no ads ) : the url of current page, any text/image/link in the page, etc.
Rank Repository Language Stars
1 twbs/bootstrap JavaScript 62111
2 jquery/jquery JavaScript 27082
3 joyent/node JavaScript 26352
4 h5bp/html5-boilerplate CSS 23355
5 mbostock/d3 JavaScript 20715
6 rails/rails Ruby 20284
7 FortAwesome/Font-Awesome CSS 19506
8 bartaz/impress.js JavaScript 18637
9 angular/angular.js JavaScript 17994
@lesschar
lesschar / jetbrain-actionlist
Created May 18, 2015 14:02
Jetbrain ActionList
--- Actions ---
$Copy <C-C> <C-Ins>
$Cut <C-X> <S-Del>
$Delete <Del>
$LRU
$Paste <C-V> <S-Ins>
$Redo <C-S-Z> <A-S-BS>
$SearchWeb <A-C-G>
$SelectAll <C-A>
$Undo <C-Z> <A-BS>

Developer Cheat Sheets

This are my cheat sheets that I have compiled over the years. Tired of searching Google for the same things, I started adding the information here. As time went on, this list has grown. I use this almost everday and this Gist is the first bookmark on my list for quick and easy access.

I recommend that you compile your own list of cheat sheets as typing out the commands has been super helpful in allowing me to retain the information longer.

@lesschar
lesschar / ssh-multi.sh
Last active August 29, 2015 14:16 — forked from dmytro/ssh-multi.sh
Start multiple synchronized SSH connections with Tmux
#!/bin/bash
# ssh-multi
# D.Kovalov
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html
# a script to ssh multiple servers over multiple tmux panes
starttmux() {
if [ -z "$HOSTS" ]; then
@lesschar
lesschar / rails_resources.md
Last active August 29, 2015 14:11 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h