Skip to content

Instantly share code, notes, and snippets.

View ironcamel's full-sized avatar

Naveed Massjouni ironcamel

  • Blacksburg, VA, USA
View GitHub Profile
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active April 16, 2024 16:36
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@mannih
mannih / hl-var.vim
Last active August 29, 2015 14:01
Automatic variable highlighting in vim the easy way
" Vim plugin to highlight variables in Perl.
" I now created a repository from this: https://github.com/mannih/vim-perl-variable-highlighter
function! s:hlvar()
if ( exists( "w:current_match" ) )
call matchdelete( w:current_match )
unlet w:current_match
endif
let l:old_iskeyword = &iskeyword
@dolmen
dolmen / README.md
Last active December 30, 2023 10:25
Check if your Perl 5 stack is vulnerable to the OpenSSL heartbleed bug

Check if your Perl stack is vulnerable to the OpenSSL « heartbleed » bug.

curl -s https://gist.githubusercontent.com/dolmen/10096474/raw/ssl-heartbleed-check.pl | perl
@branneman
branneman / better-nodejs-require-paths.md
Last active April 25, 2024 13:21
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@throughnothing
throughnothing / pr.md
Created October 29, 2012 16:51 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@throughnothing
throughnothing / README.md
Created June 2, 2012 14:55
DBIx::Class::DeploymentHandler Pkey + Ordering Test

Primary Key/Ordering test for DBIx::Class::DeploymentHandler

  • Create the version 1 tables in a postgres schema, then create DBIC classes with dbicdump.sh
  • run ./gen_migration.pl 1
  • Drop tables, and create version 2 tables from db.sql
  • run ./gen_migration.pl 2
  • Check sql/PostgreSQL/upgrade/1-2/001-auto.sql
  • Should know to add the new PRIMARY KEY on test table before adding the FOREIGN KEY to test2 table
@throughnothing
throughnothing / parks.pl
Created April 30, 2012 03:50
spark clone in perl
#!/usr/bin/env perl
# parks - spark clone in perl (https://github.com/holman/spark)
# Alternatives: https://github.com/holman/spark/wiki/Alternative-Implementations
# Wicked Cool Examples: https://github.com/holman/spark/wiki/Wicked-Cool-Usage
use List::Util qw( min max ); local $/;
my ($t, @n) = ( [qw(▁ ▂ ▃ ▄ ▅ ▆ ▇ █)], -t STDIN ? @ARGV : split ' ', <STDIN> );
print map($t->[ int( ( $_ - min(@n) ) / max(@n) * $#$t ) ], @n), "\n";
@dk
dk / parallel.pl
Created March 12, 2012 13:21
parallel http io::lambda
#!/usr/bin/perl
use strict;
use warnings;
use lib qw(./lib);
use HTTP::Request;
use IO::Lambda qw(:lambda);
use IO::Lambda::HTTP qw(http_request);
use Time::HiRes qw(time);
my @urls = (
@mvickers
mvickers / some_website
Created October 20, 2011 05:05
Basic Centos init script for Dancer apps
#!/bin/sh
#
# some_website - this script starts and stops some_website
#
# chkconfig: - 85 15
# description: Some website description
# pidfile: /var/run/plackup.some_website.pid
PID=/var/run/plackup.some_website.pid
@p01
p01 / LICENSE.txt
Last active March 9, 2024 13:40 — forked from 140bytes/LICENSE.txt
Sudoku Solver in 140bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE