Created from the plain text reference card on orgmode.org Download this file, and open it in Emacs org-mode!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SnipMate is required to use snippets | |
# Download SnipMate: http://www.vim.org/scripts/script.php?script_id=2540 | |
# Put this file in ~/.vim/snippets/ then restart vim | |
# This snippet file includes many useful snippets for CodeIgniter. Please feel free to fork and contribute! | |
snippet php | |
<?php | |
${1} | |
?> | |
snippet ec | |
echo "${1:string}"${2}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
DrupalPasswordHasher | |
To use, put this in any app and add to your settings.py, something like this: | |
PASSWORD_HASHERS = ( | |
'django.contrib.auth.hashers.PBKDF2PasswordHasher', | |
'myproject.myapp.drupal_hasher.DrupalPasswordHasher', | |
'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher', | |
'django.contrib.auth.hashers.BCryptPasswordHasher', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XMonad | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Util.EZConfig | |
import XMonad.Actions.MouseGestures | |
import XMonad.Actions.CycleWS | |
import XMonad.Actions.SpawnOn | |
import qualified XMonad.StackSet as W | |
import qualified Data.Map as M | |
myManageHook = composeAll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Modern Font Stacks */ | |
/* System */ | |
font-family: system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif; | |
/* System (Bootstrap 5.2.0) */ | |
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; | |
/* Times New Roman-based serif */ | |
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; |
Why? @sstephenson explains it best here.
This should get rid of the rvm dir and any installed rubies:
$ rvm implode
Find it here: https://github.com/bitemyapp/learnhaskell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module DiscourseUsersMerger | |
class Merger | |
def merge(target_username, source_username) | |
raise "User to merge and target user can't be the same" if target_username == source_username | |
target_user = User.find_by_username!(target_username) | |
source_user = User.find_by_username!(source_username) | |
puts "About to merge #{source_username} (#{source_user.email}) into #{target_username} (#{target_user.email})" | |
puts "#{source_user.topics.count} topics with #{source_user.posts.count} posts will be moved. Ok to continue? (y/n)" | |
continue = STDIN.gets.chomp.downcase == 'y' |
OlderNewer