Skip to content

Instantly share code, notes, and snippets.

View nerdfiles's full-sized avatar
⚕️
bringing about the end-times of the philosophy

aha hah nerdfiles

⚕️
bringing about the end-times of the philosophy
View GitHub Profile
@while0pass
while0pass / listchars.vim
Last active July 9, 2024 15:13
show/hide hidden characters in Vim
" hide hidden chars
:set nolist
" show hidden characters in Vim
:set list
" settings for hidden chars
" what particular chars they are displayed with
:set lcs=tab:▒░,trail:▓,nbsp:░
" or
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active April 14, 2026 21:27
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
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
@rcrowley
rcrowley / deps.pp
Created November 16, 2010 00:14
Deploying Django with Puppet
stage { "pre": before => Stage["main"] }
class python {
package {
"build-essential": ensure => latest;
"python": ensure => "2.6.6-2ubuntu1";
"python-dev": ensure => "2.6.6-2ubuntu1";
"python-setuptools": ensure => "latest";
}
exec { "easy_install pip":
path => "/usr/local/bin:/usr/bin:/bin",
@gitkaste
gitkaste / gist:701879
Created November 16, 2010 14:37
newsbeuter
require 'formula'
class Newsbeuter <Formula
url 'http://www.newsbeuter.org/downloads/newsbeuter-2.2.tar.gz'
homepage 'http://www.newsbeuter.org'
md5 '2add1dfe8d3684e67ab75f0c5172c705'
depends_on 'gettext'
depends_on 'stfl'
depends_on 'pkg-config'
@uhop
uhop / admin.py
Created March 14, 2011 00:31
Adding Dojo's rich editor to Django's Admin.
# Example how to add rich editor capabilities to your models in admin.
from django.contrib.admin import site, ModelAdmin
import models
# we define our resources to add to admin pages
class CommonMedia:
js = (
'https://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js',
@codatory
codatory / gist:892502
Created March 29, 2011 15:04
git-goodness
# This is in my .profile, you could also put it in your .bash_profile
feature_deliver() {
CURRENT=`git branch | grep '\*' | awk '{print $2}'`
feature_update
git checkout master
git merge --squash --no-commit ${CURRENT}
git commit
}
feature_update() {
@jtrain
jtrain / taggit-on-zinnia-example.py
Created July 7, 2011 03:54
Using django-taggit on django-zinnia instead of django-tagging
"""
Example of installing django-taggit onto a Zinnia Entry model
(django-blog-zinnia) which traditionally uses django-tagging.
The django-taggit manager is installed on the tagged_as attribute because
tagged is already taken by the existing django-tagging installation (which we don't remove).
"""
from django.contrib import admin
@jonashaag
jonashaag / 0-howto-listfield-django-admin.rst
Created September 7, 2011 09:41
Howto use ListFields in Django's admin

Howto use ListFields in Django's admin

Problem

Consider this blog post model:

models.py

@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@domenic
domenic / di-in-requirejs.js
Created October 10, 2011 04:05
Dependency injection sample with RequireJS
// EntryPoint.js
define(function () {
return function EntryPoint(model1, model2) {
// stuff
};
});
// Model1.js
define(function () {
return function Model1() {