Skip to content

Instantly share code, notes, and snippets.

View felixkiss's full-sized avatar

Felix Kiss felixkiss

View GitHub Profile
@isaacs
isaacs / comma-first-var.js
Created April 6, 2010 19:24
A better coding convention for lists and object literals in JavaScript
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
var a = "ape",
b = "bat",
c = "cat",
d = "dog",
@kylebarrow
kylebarrow / example.html
Created June 23, 2011 06:30
Prevent links in standalone web apps opening Mobile Safari
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>
anonymous
anonymous / index.php
Created October 18, 2011 20:38
Expose Slim urlFor to Twig
<?php
// Wrapper function to access urlFor.
function slim_url_for($name, $params = array()) {
return Slim::getInstance()->urlFor($name, $params);
}
// Setup Twig.
TwigView::$twigDirectory = '/path/to/twig/';
// Expose urlFor to Twig.
@Jaybles
Jaybles / UIDeviceHardware.h
Created October 28, 2011 19:33
UIDeviceHardware - Determine iOS device being used
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
- (NSString *) platform;
@ryanb
ryanb / chef_solo_bootstrap.sh
Created April 5, 2012 04:35
Bootstrap Chef Solo
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
make install
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@fedeisas
fedeisas / gist:5862227
Last active December 18, 2015 23:29
Inline CSS Styles on Laravel 4
<?php
/* 1. Add the dependency to your composer.json.
// I'm using https://packagist.org/packages/tijsverkoyen/css-to-inline-styles
*/
/* 2. Extend \Illuminate\Mail\Mailer to override the getView() method
// app/libraries/MyApp/Mailer.php
*/
namespace MyApp\Mail;
<?php
class ValidationModel extends Eloquent {
/**
* Hold the validation rules for the model
*
* @var array
*/
protected $rules = array();
@JeffreyWay
JeffreyWay / .vimrc
Last active January 22, 2024 11:42
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@sud0n1m
sud0n1m / hiring.md
Created June 5, 2014 12:41
Hiring at Customer.io

Hiring at Customer.io

Hiring checklist of things we're looking for

  • Makers & Fixers
  • Love what they do
  • Empathetic
  • Good communicators
  • Independent
  • Willing to help