This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function custom_behaviors_uif_post_create($account, $user_data, $form_state) { | |
custom_behaviors_after_user_import($account, $user_data, $form_state); | |
} | |
function custom_behaviors_uif_post_update($account, $user_data, $form_state) { | |
custom_behaviors_after_user_import($account, $user_data, $form_state); | |
} | |
function custom_behaviors_after_user_import($account, $user_data, $form_state) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mkdir ios | |
mkdir android | |
convert $1 -resize 120x120 ios/[email protected] | |
convert $1 -resize 180x180 ios/[email protected] | |
convert $1 -resize 76x76 ios/appicon-76.png | |
convert $1 -resize 152x152 ios/[email protected] | |
convert $1 -resize 40x40 ios/appicon-Small-40.png | |
convert $1 -resize 80x80 ios/[email protected] | |
convert $1 -resize 29x29 ios/appicon-Small.png |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(["dojo", "dojo/on", "dojo/aspect", "sb", "put-selector/put", "dgrid/selector"], | |
function(dojo, on, aspect, sb, put, selector){ | |
dojo.global.starbug.grid.columns = dojo.global.starbug.grid.columns || {}; | |
dojo.global.starbug.grid.columns.selector = function(column){ | |
//populate the cell with the label or value | |
column.renderCell = function(object, value, cell, options){ | |
put(parent && parent.contents ? parent : cell, ".dgrid-selector"); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
# This scripts allows you to upload a binary to the iTunes Connect Store and do it for a specific app_id | |
# Because when you have multiple apps in status for download, xcodebuild upload will complain that multiple apps are in wait status | |
# Requires application loader to be installed | |
# See https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/SubmittingTheApp.html | |
# Itunes Connect username & password | |
USER="user" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/********************************************************* | |
* we can add a uri by calling the uri function: | |
* $this->uri("[path]", "[property1]:[value1] [property2]:[value2]"); | |
* | |
* setting the path to "my-new-page" will mean that the page | |
* can be accessed at the url /my-new-page | |
********************************************************/ | |
$this->uri("my-new-page"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($handle = opendir($dir)) { | |
while (false !== ($entry = readdir($handle))) { | |
if ($entry != "." && $entry != "..") { | |
//$entry is the file or directory name | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (a) { | |
if (/android|avantgo|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Host { | |
/* the type of environment this is: development or production */ | |
const ENVIRONMENT = "development"; | |
/* details for database */ | |
const DB_TYPE = "mysql"; | |
const DB_HOST = "localhost"; | |
const DB_USERNAME = "dbuser"; | |
const DB_PASSWORD = "dbpass"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Standard CSS */ | |
/*********** COMMON ***********/ | |
*{margin:0;padding:0} | |
html{font-size:100%} | |
a img{border:none;position:relative;top:2px} | |
body{font-size:12px;text-align:center;color:#666} | |
/*********** FONTS ***********/ | |
body, input{font-family: Helvetica, Arial, sans-serif} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
$usage = "Automated Wordpress installer\nby Ali Gangji\nUsage: wordpress install_dir -u dbuser -p dbpass -d dbname\nOptions:\n"; | |
$usage .= " -u dbuser Database username\n"; | |
$usage .= " -p dbpass Database password\n"; | |
$usage .= " -d dbname Database name\n"; | |
$usage .= " -h dbhost Database host\n"; | |
$usage .= " --private Hide blog from search engines\n"; | |
$usage .= " --prefix prefix Database prefix\n"; | |
if ($argc < 2) { |
NewerOlder