Skip to content

Instantly share code, notes, and snippets.

@alanbriolat
alanbriolat / default.conf
Created September 28, 2011 14:01
nginx userdir + PHP-FPM
server {
listen 80;
server_name localhost;
# ... other default site stuff, document root, etc. ...
location ~ ^/~(?<userdir_user>.+?)(?<userdir_uri>/.*)?$ {
alias /home/$userdir_user/public_html$userdir_uri;
index index.html index.htm index.php;
autoindex on;
@jasonrudolph
jasonrudolph / git-branches-by-commit-date.sh
Created February 12, 2012 20:40
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r
@barryvdh
barryvdh / _ide_helper.php
Last active May 6, 2024 07:45
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
@jackiewu
jackiewu / Template.php
Created September 14, 2013 14:06
[pyrocms] Breadcrumbs 使用 Navigation `Header` 的架構為主來呈現。
private function _build_breadcumbs()
{
$old_breadcrumbs = $this->_breadcrumbs;
$this->_breadcrumbs = array();
$this->_override_breadcrumbs = array();
$this->_ci->load->model('navigation/navigation_m');
$this->_ci->load->model('settings/settings_m');
$site_name = $this->_ci->settings_m->get('site_name');
$navs = $this->_ci->navigation_m->get_link_tree('header');
@jonathantneal
jonathantneal / README.md
Last active November 9, 2023 21:10
createElement.js // a 300 byte DOM Element creator

createElement.js

createElement.js lets document.createElement use CSS selectors.

This is a pretty useful library for building out DOM elements. The whole thing runs on one regex and a for loop, so it’s plenty fast. The script is 300 bytes when compressed and gzipped. For 524 bytes (advanced), it includes nesting support and can generate entire DOM hierarchies, including text nodes.

Usage

document.createElement(); // generates <div />
@zlalanne
zlalanne / tmux_cygwin.md
Last active February 3, 2023 23:33
tmux on Cygwin

Steps to install tmux in Cygwin

Install required Cygwin packages

  1. run Cygwin setup.exe
  2. install these packages that are not installed by default: automake, gcc, git and pkg-config

Install libevent

  1. browse http://libevent.org
  2. download libevent-2.0.21-stable.tar.gz
@vertexclique
vertexclique / cracking.md
Last active May 11, 2024 21:17
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@darwin
darwin / gist:d74ddce510f4a0b40b29
Created May 27, 2014 15:56
How to fix TotalFinder / Finder ghost window icons on Desktop (when dragging/tearing Finder's tab off)
osascript -e "tell application \"Finder\" to quit" && defaults write com.apple.finder DisableAllAnimations -bool false && defaults write com.apple.finder AnimateWindowZoom -bool true && defaults write com.apple.finder TotalFinderDontFixInstallerDefaults -bool true
@jackiewu
jackiewu / Pull Menu - Menu Interaction Concept.markdown
Created June 1, 2016 05:43
Pull Menu - Menu Interaction Concept