⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains 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
var array1 = [0,8,1,0,0,0,8,6,7,8,9,5,2,6,3,0,7,4,1,1,0,0,7,0,0,8,6,7,8,9,5,9,1,1,3,0]; | |
var array2 = [1,0,0,0,8,6,7,8,9,1,3,0,0,8,5,2,6,3,0,7,4,1,1,0,0,7,0,0,8,6,7,8,9,5,9,1]; | |
var array3 = [1,0,5,2,6,3,0,7,4,1,1,0,0,7,0,0,8,6,7,8,9,5,0,0,8,6,7,8,9,1,3,0,0,8,9,1]; | |
function findPattern(array, array1, array2){ | |
var result=0; | |
for(i=0; i<array.length; i++){ | |
if( array[i] == 1 && | |
array[i+1] == 3 && |
This file contains 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/env bash | |
# about :: | |
# the master form for deploys and rollbacks. | |
# there is the part that sits on one server (staging?) | |
# and the one on the server that needs to be deployed to (production?) | |
# Copyright (c) 2012 Dele Omotosho | |
# GPLv3 : http://www.gnu.org/licenses/gpl-3.0.html |
This file contains 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
private function _twitter($tweet_count, $username) { | |
if (empty($username)) { | |
return false; | |
} | |
// $this->_fetch_tweet(); | |
$tweets = get_transient('recent_tweets_widget'); | |
if (!$tweets) { | |
$this->_fetch_tweets($tweet_count, $username); | |
} |
This file contains 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
http://programming-motherfucker.com/ |
This file contains 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
RewriteEngine on | |
# if a directory or a file exists, use it directly | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
# otherwise forward it to index.php | |
RewriteRule . index.php | |
This file contains 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 defined('SYSPATH') or die('No direct script access.'); | |
class HTML extends Kohana_HTML { | |
public static function scripts(array $scripts, $attributes=array(), $index = FALSE) | |
{ | |
$response = ''; | |
//Data sanitisation | |
$index = $index ? TRUE : false; | |
if ( !is_array($attributes) ) $attributes = array(); |
This file contains 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
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^(application|modules|system) - [F,L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule .* index.php/$0 [PT,L] |
This file contains 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
RewriteEngine on | |
# if a directory or a file exists, use it directly | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
# otherwise forward it to index.php | |
RewriteRule . index.php |