Skip to content

Instantly share code, notes, and snippets.

View Wuntenn's full-sized avatar
🍚
...

Daron Jones Wuntenn

🍚
...
View GitHub Profile
@Wuntenn
Wuntenn / gitignore_per_git_branch.md
Created June 28, 2021 13:45 — forked from wizioo/gitignore_per_git_branch.md
HowTo have specific .gitignore for each git branch

How to have specific .gitignore for each git branch

Objective

My objective is to have some production files ignored on specific branches. Git doesn't allow to do it.

Solution

My solution is to make a general .gitignore file and add .gitignore.branch_name files for the branches I want to add specific file exclusion. I'll use post-checkout hook to copy those .gitignore.branch_name in place of .git/info/exclude each time I go to the branch with git checkout branch_name.

@Wuntenn
Wuntenn / repl-client.js
Created August 10, 2019 22:19 — forked from TooTallNate/repl-client.js
Running a "full-featured" REPL using a net.Server and net.Socket
var net = require('net')
var sock = net.connect(1337)
process.stdin.pipe(sock)
sock.pipe(process.stdout)
sock.on('connect', function () {
process.stdin.resume();
process.stdin.setRawMode(true)
@Wuntenn
Wuntenn / bbs.js
Created August 10, 2019 22:04 — forked from TooTallNate/bbs.js
Running a node.js REPL over `curl`
/**
* Requires node v0.7.7 or greater.
*
* To connect: $ curl -sSNT. localhost:8000
*/
var http = require('http')
, repl = require('repl')
, buf0 = new Buffer([0])
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
meanjs@0.5.0-beta /Users/daron/Sites/experiments/pomodoro_node
├── UNMET PEER DEPENDENCY eslint-plugin-react@^4.0.0
└─┬ gulp@3.9.1
└─┬ vinyl-fs@0.3.14
└─┬ graceful-fs@3.0.11
└── natives@1.1.0
@Wuntenn
Wuntenn / grok_vi.mdown
Created May 22, 2016 18:40 — forked from nifl/grok_vi.mdown
Your problem with Vim is that you don't grok vi.

Answer by Jim Dennis on Stack Overflow question http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

Your problem with Vim is that you don't grok vi.

You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).

The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:

0 go to the beginning of this line. y yank from here (up to where?)

@Wuntenn
Wuntenn / README.md
Created January 14, 2016 13:51 — forked from nicerobot/README.md
Mac OS X uninstall script for packaged install of node.js

To run this, you can try:

curl -ks https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh | bash

I haven't tested this script doing it this way but i run a lot of my Gists like this so maybe this one'll work too.

Alternatively,

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh

chmod +x ./uninstall-node.sh

@Wuntenn
Wuntenn / gist:db8d7e15d4bf865c3a15
Created November 21, 2014 16:32
Me trying to use saz/ssh
class { 'ssh':
storeconfigs_enabled => false,
server_options => {
'Match User www-data' => {
'PasswordAuthentication' => 'yes',
'AllowTcpForwarding' => 'no',
'X11Forwarding' => 'no',
},
'Port' => [2222],
I have a remote server running Ubuntu 9.04 and on it a repository and webserver. I have configured a custom port or ssh. So i access it like:
ssh -p 12345 myuser@myserverIP - works fine
In order to ssh into it i use a tunnel defined as:
mytunnel = /usr/bin/ssh -p 12345 -l myuser
In the file /home/myuser/.subversion/config on my local machine (mac book pro running OS X 10.4)
I have a remote server running Ubuntu 9.04 and on it a repository and webserver. I have configured a custom port or ssh. So i access it like:
ssh -p 12345 myuser@myserverIP - works fine
In order to ssh into it i use a tunnel defined as:
mytunnel = /usr/bin/ssh -p 12345 -l myuser
In the file /home/myuser/.subversion/config on my local machine (mac book pro running OS X 10.4)