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
function title_case($string, $delimiters = array(" ", "-", "O'"), $exceptions = array("to", "a", "the", "of", "by", "and", "with", 'it', 'as', "for")) { | |
/* | |
* Exceptions in lower case are words you don't want converted | |
* Exceptions all in upper case are any words you don't want converted to title case | |
* but should be converted to upper case, e.g.: | |
* king henry viii or king henry Viii should be King Henry VIII | |
*/ | |
foreach ($delimiters as $delimiter){ | |
$words = explode($delimiter, $string); | |
$newwords = 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
a = [ 'webkit', 'moz', 'ms', 'o', '' ] | |
n = 'enter' | |
f = { | |
'from' : [ | |
'opacity: 0', | |
'.transform( e(\'rotate(360deg)\')' | |
], | |
'to' : [ | |
'opacity: 1', |
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
It works both ways. If designers understood the shit developers have to go through when they send them >1GB PSDs with badly named layers and multiplies everywhere and if developers understood why designers want that button moved by 3px we'd live in a better world. | |
A designer doesn't need to know how to code as such but understand how the development process works (if they can good well, that's always a bonus) and a developer needs to understand the design process too (if they can use photoshop and edit the PSDs then we're going well). | |
The fact of the matter is that in this day and age it's less about being a master of one trade or a jack of all, but having a good understanding how different factors from design, development and even sysadmin, come together to make a digital "product". It's that key understanding that means that the players in the different verticals will respect each others comments and decisions. |
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
$m = $wp_query->max_num_pages; | |
if ( $m > 1 ) | |
{ | |
?> | |
<div class="pagination"> | |
<ul> | |
<?php for ( $i = 1; $i <= $m; $i++ ): ?> | |
<li> | |
<a href="<?php the_permalink(); ?>/page/<?php echo $i; ?>" title="Go to page <?php echo $i; ?>"> |
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 python | |
import profile | |
LIST = ['ass','ass lick','asses','asshole','assholes','asskisser','asswipe','balls','bastard','beastial','beastiality','beastility','beaver','belly whacker','bestial','bestiality','bitch','bitcher','bitchers','bitches','bitchin','bitching','blow job','blowjob','blowjobs','bonehead','boner','brown eye','browneye','browntown','bucket cunt','bull shit','bullshit','bum','bung hole','butch','butt','butt breath','butt fucker','butt hair','buttface','buttfuck','buttfucker','butthead','butthole','buttpicker','chink','circle jerk','clam','clit','cobia','cock','cocks','cocksuck','cocksucked','cocksucker','cocksucking','cocksucks','cooter','crap','cum','cummer','cumming','cums','cumshot','cunilingus','cunillingus','cunnilingus','cunt','cuntlick','cuntlicker','cuntlicking','cunts','cyberfuc','cyberfuck','cyberfucked','cyberfucker','cyberfuckers','cyberfucking','damn','dick','dike','dildo','dildos','dink','dinks','dipshit','dong','douche bag','dumbass','dyke','ejaculate','ejaculated' |
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 Storage = function(name, callback) | |
{ | |
var cache = { }; | |
var keysIndex = '_' + name + '_'; | |
var write = true; | |
// let's cache! | |
function _get(key) | |
{ | |
var data = _.clone( cache[ key ] ); |
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 | |
DIR='tmp' | |
REMOTE='your_app' | |
echo 'Making tmp dir' | |
if [[ -d "$DIR" ]]; then | |
rm -rf $DIR | |
fi | |
echo 'Exporting SVN to tmp' |
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
String.prototype.linkify = function() | |
{ | |
var str = this.toString(); | |
str = str.replace(/(https?:\/\/[^\s]+)/gim, '<a href="$1">$1</a>', str); | |
str = str.replace(/([#|@][^\s]+)/gim, '<a href="http://twitter.com/$1">$1</a>', str); | |
return str; | |
} |
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
FROM octohost/base:trusty | |
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys C300EE8C; \ | |
echo 'deb http://ppa.launchpad.net/nginx/stable/ubuntu trusty main' > /etc/apt/sources.list.d/nginx-stable-trusty.list; \ | |
apt-get update; \ | |
apt-get install -y nginx git | |
ADD /tmp-conf/default /etc/nginx/sites-available/default | |
ADD /tmp-conf/nginx.conf /etc/nginx/nginx.conf |
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
Verifying that +ahmednuaman is my blockchain ID. https://onename.com/ahmednuaman |