Skip to content

Instantly share code, notes, and snippets.

@rafi
rafi / gource-commands.txt
Created April 14, 2010 15:26 — forked from alkavan/gource-commands.txt
Gource command
################################
gource commands
################################
# basic command for big and long projects
gource --max-user-speed 500 --seconds-per-day 0.05 --file-idle-time 10 -e 0.005 -f --max-files 300 --hide-files
# some easy to understand commands
# for output file
--output-ppm-stream ~/ppm/ppm-kohana
@stantonk
stantonk / hg_batch_pull.sh
Created March 7, 2012 17:05
Perform batch "pull -u" on multiple Mercurial repositories from the parent directory
#!/bin/bash
# This script finds all the mercurial repositories in the current directory
# and does a "hg pull -u" to get the latest changes from all the repositories.
#
# Make sure you know what you're doing before running this ;-)
confirm_prompt() {
read -p "Are you sure you want to 'hg pull -u' every repository? " -n 1
echo
@johnantoni
johnantoni / mysql.txt
Created August 7, 2012 18:57
mysql + vagrant + remote access
username: vagrant
password: vagrant
sudo apt-get update
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev
sudo aptitude install mysql-server mysql-client
sudo nano /etc/mysql/my.cnf
@paulirish
paulirish / gist:4158604
Created November 28, 2012 02:08
Learn JavaScript concepts with recent DevTools features

Learn JavaScript concepts with the Chrome DevTools

Authored by Peter Rybin , Chrome DevTools team

In this short guide we'll review some new Chrome DevTools features for "function scope" and "internal properties" by exploring some base JavaScript language concepts.

Closures

Let's start with closures – one of the most famous things in JS. A closure is a function, that uses variables from outside. See an example:

@cbmd
cbmd / default.conf
Created December 9, 2012 21:13
nginx config - dynamic virtual hosts
server {
index index.php;
set $basepath "/var/www";
set $domain $host;
# check one name domain for simple application
if ($domain ~ "^(.[^.]*)\.dev$") {
set $domain $1;
set $rootpath "${domain}";
@textarcana
textarcana / _install_sonar_php.sh
Last active September 12, 2016 05:37
Sonar for PHP installation steps for CentOS 6. See also http://docs.codehaus.org/display/SONAR/Installing+PHP+Environment as well as my Pinboard bookmarks for Sonar installation: https://pinboard.in/u:noahsussman/t:sonar+install
# Sonar for PHP installation for CentOS 6
# See http://docs.codehaus.org/display/SONAR/Installing+PHP+Environment
/sbin/service mysqld start
sudo /usr/bin/mysql_secure_installation
# for non-production instances, choose not to create a root password
mkdir /var/sonar
wget http://dist.sonar.codehaus.org/sonar-3.4.1.zip
unzip sonar-3.4.1.zip
@frimik
frimik / git-submodule-sync.rb
Created March 9, 2013 19:32
Make damn sure that git submodule sync is going to work.
#! /usr/bin/env ruby
submods = Hash.new
%x{git config -f .gitmodules --get-regexp '^submodule\..*\.(path|url)$'}.lines.each do |l|
submodule, key, value = l.match(/^submodule\.(.*)\.(path|url)\s+(.*)$/)[1..3]
submods[submodule] = Hash.new unless submods[submodule].is_a?(Hash)
submods[submodule][key] = value
end
anonymous
anonymous / gist:11211425
Created April 23, 2014 11:22
fluidcontent fal template
{namespace flux=FluidTYPO3\Flux\ViewHelpers}
{namespace v=Tx_Vhs_ViewHelpers}
<f:layout name="Content" />
<f:section name="Configuration">
<flux:form id="image" wizardTab="Content" options="{Fluidcontent: '{sorting: 40}'}">
<flux:field.inline.fal name="image" minItems="1" />
<flux:field.checkbox name="zoom" />
<flux:field.checkbox name="showBorder" />
@NamelessCoder
NamelessCoder / MyModel.php
Last active November 25, 2015 14:02
Example of using annotations to generate TCA configuration based on a Model class.
<?php
namespace FluidTYPO3\Demo\Domain\Model;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
/**
* Domain Model: Simple entry with tag relations.
*
* The annotations on the class-level doc comment define
@irnnr
irnnr / README.md
Last active October 2, 2015 02:14
TYPO3 Dynamic Return Type code completion