Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / gource-multiple-repositories.sh
Created March 24, 2011 01:10
Generates gource video out of multiple repositories.
#!/usr/bin/env bash
# Generates gource video (h.264) out of multiple repositories.
# Pass the repositories in command line arguments.
# Example:
# <this.sh> /path/to/repo1 /path/to/repo2
i=0
for repo in $*; do
# 1. Generate a Gource custom log files for each repo. This can be facilitated by the --output-custom-log FILE option of Gource as of 0.29:
logfile="$(mktemp /tmp/gource.XXXXXX)"
@mgdm
mgdm / jsonprint
Created April 6, 2011 16:54
Pretty-print JSON from any URL PHP's file_get_contents can reach
#!/usr/bin/php
<?php
function usage() {
echo "Usage: " . $_SERVER['argv'][0] . " [-v] URL\n";
echo "\nPretty-prints JSON output from a URL.";
echo "\n\t-v\tDecode JSON and use var_dump to display result\n";
}
@naaman
naaman / gist:1053217
Created June 29, 2011 05:33
Hot Swapping With Maven, Jetty and IntelliJ

Hot Swapping With Maven, Jetty and IntelliJ

Based on Configuring Jetty, Maven, and Eclipse together with Hot Swap

I've always been a bit jealous when it comes to the Play! framework and the great dev mode they have for hot swapping classes at runtime. Jetty has a configuration setting, scanIntervalSeconds, that mimics this when working with a more traditional WAR, but does so by looking for changes to a file and restarting the server.

Fortunately, Jetty also provides the ability to rapidly test code with hot swapping. No more server restarts. The trick to getting hot swapping to work is to attach a remote debugger to your Jetty process. The following instructions outline how to do this in IntelliJ (tested with IDEA 10.5 CE).

Modify your jetty-maven-plugin to ignore the scan interval

  1. Open your pom and locate the plugins section
@ziadoz
ziadoz / awesome-php.md
Last active July 13, 2024 05:29
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@firewalker06
firewalker06 / gist:4696072
Created February 2, 2013 04:07
Beautify JSON, copied from http://pastebin.com/xB0fG9py
<?php
/**
* @author Marcelius 'mardagz' Dagpin
* @name Beautify JSON
* @copyright 2012
* @uses /
* $json_array = array(
* "name" => "mardagz",
* "gender" => "lalaki po akow hihihi",
* "age" => 40
@GFoley83
GFoley83 / tw-bs.3.1.1.css
Last active September 13, 2017 15:55
Twitter Bootstrap 3.1.1 namespaced to "tw-bs" so as not to conflict with other libraries/pre-existing css rules.
/*
Bootstrap 3.1.1 namepaced to .tw-bs
E.g.
<table>
// my regular table
</table>
<div class="tw-bs">
<table>
@wesbos
wesbos / gulpfile.js
Last active October 21, 2019 19:38
FAST Browserify + Reactify + Babelify
// Update: Hey Folks - I've got a full Gulpfile with everything else over at https://github.com/wesbos/React-For-Beginners-Starter-Files
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var gutil = require('gulp-util');
var browserify = require('browserify');
var reactify = require('reactify');
var babelify = require('babelify');
var watchify = require('watchify');
var notify = require('gulp-notify');
@YumaInaura
YumaInaura / VIM.md
Last active September 23, 2024 13:33
Vim — What is the name of "q and colon" mode? ( A. command-line window )

Vim — What is the name of "q and colon" mode? ( A. command line window )

Or named "command window".

I mean "q and colon" ( q: ).

Not "colon and q" means quit vim ( :q ).

image