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
// Mixins for element and modifier | |
//elements get appended with "__" and the $name | |
@mixin e($name) { | |
@at-root &__#{$name} { | |
@content; | |
} | |
} | |
//modifiers get appended with "--" and the $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
{ | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"color_scheme": "Packages/User/Monokai (SL).tmTheme", | |
"detect_slow_plugins": true, | |
"disable_colored_group_labels": true, | |
"disable_coloured_folder_labels": true, | |
"disable_formatted_linebreak": true, | |
"fade_fold_buttons": true, | |
"folder_exclude_patterns": |
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
[ | |
{ "keys": ["super+v"], "command": "paste_and_indent" }, | |
{ "keys": ["super+shift+v"], "command": "paste" }, | |
{ "keys": ["ctrl+super+w"], "command": "close_all" }, | |
{ "keys": ["super+ctrl+e"], "command": "open_file", "args": {"file": "${project}" } }, | |
// { "keys": ["super+down"], "command": "goto_definition" }, | |
{ "keys": ["super+b"], "command": "toggle_side_bar" }, | |
{ | |
"keys": ["ctrl+alt+left"], | |
"command": "set_layout", |
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
#!/bin/bash | |
function newsite { | |
local email="andrew@electricstudio.co.uk" | |
local appdir="/Users/andrew/Sites/$1" | |
local httpd_vhosts="/etc/apache2/extra/httpd-vhosts.conf" | |
# local input=$1 | |
# local size=${#input} | |
# local max="8" | |
local basedir=$PWD |
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
// original HTML, when added to post | |
<img src="http://boilerplate.dev/wp-content/uploads/2015/03/spiral_01.jpg" alt="spiral_01" width="993" height="1000" class="alignnone size-full wp-image-45" /> | |
// when change the class, order of HTML is changed. | |
<img class="alignnone wp-image-45 size-full" src="http://boilerplate.dev/wp-content/uploads/2015/03/spiral_01.jpg" alt="spiral_01" width="993" height="1000" /> | |
Need to get: | |
1. class | |
i. the number 45 from the end of wp-image-45 |
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
pass() { | |
if [ -n "$1" ] | |
then | |
pwgen -sy $1 1 |pbcopy |pbpaste; echo " Has been copied to clipboard" | |
else | |
pwgen -sy 40 1 |pbcopy |pbpaste; echo "Has been copied to clipboard" | |
fi | |
} |
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 year_sum($year) { | |
return $minutes_cycled_year = $wpdb->get_var($wpdb->prepare(" | |
SELECT SUM($wpdb->postmeta.meta_value) | |
FROM $wpdb->postmeta, $wpdb->posts | |
WHERE $wpdb->postmeta.meta_key='exercise-minutes' | |
AND $wpdb->postmeta.post_id=$wpdb->posts.id | |
AND year($wpdb->posts.post_date)='$year' | |
")); | |
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
#rakefile | |
namespace :sass do | |
task :sass_environment => :environment do | |
Sass::Plugin.on_updating_stylesheet { |template, css| puts "Building #{css} from #{template}" } | |
Sass::Plugin.on_not_updating_stylesheet { |template, css| puts "Skipping #{css}" } | |
end | |
desc "Forcefully updates the stylesheets generated by SASS." |
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
window.setInterval(function(){ | |
jQuery.getJSON("/api/milk/single_milk/?dev=1",function(data) { | |
milkAmount = data['result']['milk-amount']; | |
console.log(milkAmount); | |
jQuery('#list').html('<h1>'+milkAmount+'</h1>'); | |
}); |
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
setInterval ( getMilk, 1000 ); | |
var old = ""; | |
function getMilk() { | |
jQuery.getJSON("/api/milk/single_milk/?dev=1",function(data) { | |
milkAmount = data['result']['milk-amount']; | |
if(old != milkAmount) { |
OlderNewer