Skip to content

Instantly share code, notes, and snippets.

@dawsontoth
dawsontoth / app.js
Created March 4, 2011 00:44
Customize the look of the tab bar in iOS Appcelerator Titanium
Ti.include('overrideTabs.js');
/*
This is a typical new project -- a tab group with three tabs.
*/
var tabGroup = Ti.UI.createTabGroup();
/*
Tab 1.
@brockboland
brockboland / local.settings.php
Created January 18, 2012 16:14
My local settings for Drupal sites
<?php
/**
* @file
* local.settings.php
*
* This settings file is intended to contain settings specific to a local
* development environment, by overriding options set in settings.php.
*
* Include this file from your regular settings.php by including this at the
* bottom:
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@jsifalda
jsifalda / php.ini
Created August 18, 2012 10:32
Xdebug: nginx (php-fpm) and phpStorm configuration
zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
[xdebug]
xdebug.idekey="macgdbp"
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9089
xdebug.remote_handler="dbgp"
@FokkeZB
FokkeZB / CROP.md
Created May 2, 2013 09:43
Image (cropping) CommonJS lib for Titanium

Often I need to display a user-provided picture in an ImageView in such a way that the whole ImageView is filled with as much of the picture possible.

This is how I do it:

var image = require('image');

Ti.Media.showCamera({
        mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],
 success: function (e) {
@Mulkave
Mulkave / drupal-nginx-virtualhost.conf
Created July 29, 2013 09:08
drupal virtual host configuration for Nginx
server {
server_name [host];
root /var/www/[document_root]; ## <-- Your only path reference.
# Enable compression, this will help if you have for instance advagg module
# by serving Gzip versions of the files.
gzip_static on;
location = /favicon.ico {
@rrosiek
rrosiek / install_mysql.sh
Last active June 5, 2023 07:08
Vagrant provision script for php, Apache, MySQL, phpMyAdmin, Laravel, and javascript helpers. Tested with Ubuntu 16.04.
#! /usr/bin/env bash
###
#
# install_mysql.sh
#
# This script assumes your Vagrantfile has been configured to map the root of
# your application to /vagrant and that your web root is the "public" folder
# (Laravel standard). Standard and error output is sent to
# /vagrant/vm_build.log during provisioning.
@simonista
simonista / .vimrc
Last active June 19, 2024 15:35
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
name = Filter Cleanup
description =
package =
core = 7.x
@shichao-an
shichao-an / authors-prog.sh
Last active February 11, 2022 20:11
Script for git svn --authors-prog argument (author name conversion)
#!/usr/bin/env bash
# Script for converting author from SVN to Git, used as an argument for
# --authors-prog
# Example:
# "foo.bar" will be "Foo Bar <foo.bar@example.com>"
# "not-human" will be "not-human <not-human@example.com>"
set -e
EMAIL_DOMAIN=example.com