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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://npmjs.org/install.sh | sh |
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
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
ServerName DOMAIN.com | |
ServerAlias www.DOMAIN.com | |
DocumentRoot /var/www/DOMAIN.com/public_html | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride All | |
</Directory> |
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
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Color Scheme - Tomorrow/Tomorrow-Night.tmTheme", | |
"font_face": "Source Code Pro", | |
"font_size": 14, | |
"highlight_line": true, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], |
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
$("#page_whole > p > a > img").each(function(index){ | |
if($(this).parent().parent().is("p")){ | |
$(this).parent().unwrap(); | |
} | |
}); |
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 | |
$post_title = get_the_title(); | |
if($post_title == 'x'){ | |
echo $post_title."y"; | |
} else { | |
echo $post_title; | |
} | |
?> |
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 __future__ import print_function | |
import giantbomb | |
gb = giantbomb.Api('fe35a7029d3d80722ab9d05d4a9a4c53e115f4f8') | |
f = open('games.txt', 'w') | |
for num in range(1,41000): | |
try: | |
game = gb.getGame(num) | |
print('"'+str(game.id)+'"'+',"'+str(game.name)+'","'+str(game.deck)+'"', file=f) | |
except Exception, error: |
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
import urllib | |
import giantbomb | |
gb = giantbomb.Api('apikeyhere') | |
for num in range(1,41000): | |
try: | |
game = gb.getGame(num) | |
for key, value in dict.items(game.image): | |
if key == "super_url": | |
super_img = str(value) |
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
{ | |
"hot_exit": false, | |
"remember_open_files": false | |
} |
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 | |
function save_fields() | |
{ | |
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) | |
return $post_id; | |
global $post; | |
update_post_meta($post->ID, 'field_name', $_POST['field_name']); | |
} |
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
Want my newsroom to be url.com/newsroom (currently throws a 404) | |
Posts should be url.com/newsroom/post-title (currently works) | |
Code in functions.php: | |
// newsroom custom content type | |
function bment_post_type_newsroom() { | |
register_post_type( | |
'newsroom', array( | |
'labels' => array( |