Skip to content

Instantly share code, notes, and snippets.

View BRMatt's full-sized avatar

Matt Button BRMatt

View GitHub Profile
@endolith
endolith / Has weird right-to-left characters.txt
Last active July 17, 2024 12:41
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@brianjlandau
brianjlandau / gist:176754
Created August 28, 2009 02:59 — forked from defunkt/gist:162444
Rails Capistrano deploy using git as our deployment strategy. You'll need git version >=1.5.6.6 on your server for this to work.
# you'd obviously have more settings somewhere
set :scm, :git
set :repository, "git@github.com:defunkt/github.git"
set :branch, "origin/master"
set :migrate_target, :current # this tells capistrano where to run the migration. otherwise it would try to use the latest release directory (/path/to/app/releases/2012XXXXXXXXX)
set :use_sudo, false
set :ssh_options, {:forward_agent => true} # so you can checkout the git repo without giving the server access to the repo
set :rails_env, 'production'
# These are here to override the defaults by cap
# --------------------------------------------
# General
# --------------------------------------------
set :shared_children, %w(cache logs) # Shared directories, these directories contain generated content which should not be wiped out during deployments.
set :application, "domain.com" # Application name
set :deploy_to, "/var/www/#{application}/#{stage}" # Path where files are deployed to ...
# --------------------------------------------
# Server
# --------------------------------------------
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("forum.kohanaframework.org") {
body { background: #f1f8db !important; }
#Body {
margin: 15px 0 0 !important;
overflow: visible !important;
padding: 0 15px !important;
<?php
/**
* Kohana_Sniffs_Classes_OpeningBraceBsdAllmanSniff.
*
* PHP version 5
*
* @category PHP
* @package PHP_CodeSniffer
* @author Greg Sherwood <gsherwood@squiz.net>
* @author Marc McIntyre <mmcintyre@squiz.net>
#!/bin/bash
#
# Usage:
# PADDING=10 HTML_NORMAL=normal.html HTML_HOVER=hover.html ./webkit_sprite
#
if [ -z "$PADDING" ]
then
echo "You need to specify PADDING"
exit -1
fi
@zaius
zaius / background.sh
Created January 16, 2011 23:29
How to redirect a running process output to a file and log out
ctrl-z
bg
touch /tmp/stdout
touch /tmp/stderr
gdb -p $!
# In GDB
p dup2(open("/tmp/stdout", 1), 1)
p dup2(open("/tmp/stderr", 1), 2)
C{
#include <limits.h>
#include <errno.h>
}C
backend default {
.host = "192.168.192.134";
.port = "80";
}
@zombor
zombor / deploy.rb
Created March 21, 2011 18:05
zombor's capistrano deploy scripts
set :stages, %w(production staging)
set :default_stage, "staging"
require 'capistrano/ext/multistage'
# --------------------------------------------
# Repository
# --------------------------------------------
set :scm, :git # I am using git, so I specify it here
set :repository, "<repo>" # This is the path to the repository on the server, we pushed the code here earlier.
@zeelot
zeelot / view_model.php
Created April 6, 2011 18:15
Wrapper for ORM models to add view logic on top
<?php defined('SYSPATH') or die('No direct script access.');
class View_Model
{
public static function factory(Model $model)
{
// Get the associated View_ name (ex: View_Model_User)
$class = 'View_'.get_class($model);
if (class_exists($class))