Skip to content

Instantly share code, notes, and snippets.

@geoffyuen
geoffyuen / config.rb
Created September 4, 2013 13:50
Compass/SASS config.rb (outputs css to root for Wordpress friendliness, HTML5BP style folders)
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "/"
sass_dir = "scss"
images_dir = "img"
javascripts_dir = "js"
# You can select your preferred output style here (can be overridden via the command line):
@geoffyuen
geoffyuen / .gitignore
Created September 4, 2013 13:55
.gitignore for websites
# Include your project-specific ignores in this file
# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files
# editor temp files
*~
tmp/**/*
*.lock
*.DS_Store
*.swp
@geoffyuen
geoffyuen / dot_clean recursively
Created September 7, 2013 01:24
Even though it's documented as recursive, dot_clean does not work recursively. Do this instead.
(find . -type d | xargs dot_clean -m)
@geoffyuen
geoffyuen / Minecrafty.sh
Created September 19, 2013 22:06
Launch minecfraft
#!/bin/sh
clear
gamedir=.
assets=assets
echo "Enter user name or just enter for 'OffLine': \c"
read username
if [ -z "$username" ]
then
username=OffLine
@geoffyuen
geoffyuen / OSX Web Servers
Last active December 23, 2015 18:19
Webserver
# Static Server
## Python 2.x (OSX 10.7):
python -m SimpleHTTPServer
## Python 3.x:
python -m http.server 8000
@geoffyuen
geoffyuen / look.html
Last active December 24, 2015 00:40
Quick and dirty way to view your site at 320, 480, 768. Append ?<your site url without http://>. Eg. look.html?bing.com
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>320 | 480 | 768</title>
<style>
html, body {
background: #444;
height: 100%;
@geoffyuen
geoffyuen / Location.txt
Created September 26, 2013 19:25
Location properites
http://www.refulz.com:8082/index.php#tab2?foo=123
Property Result
-------------------------------------------
host www.refulz.com:8082
hostname www.refulz.com
port 8082
protocol http
pathname index.php
@geoffyuen
geoffyuen / gist:7343212
Created November 6, 2013 20:06
WP minimal loop with pagination - yuck
<?php
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
$the_query = new WP_Query(
array(
'posts_per_page' => '5',
'paged' => $paged
)
);
@geoffyuen
geoffyuen / gitftp.command
Last active December 28, 2015 22:09
bash script / OSX .command menu to use git ftp. Requirements: - GIT - GIT FTP - a GIT repro Put this in the folder you're working in and chmod 777 it.
#!/bin/bash
cd "$(dirname "$0")"
clear
echo "GIT FTP Menu (ctrl-c to abort)"
echo
PS3='Please enter your choice: '
options=("Commit" "Mock Upload" "Configure" "First Time Commit" "Quit")
select opt in "${options[@]}"
do
case $opt in
You must get artworkUrl512
and then replace ".png" or ".jpg" with
specific size ".100x100-75.png" or ".100x100-75.jpg"
See also list all available image formats (png / jpg):
42x42-50
53x53-50
60x60-50
72x72-65