This file contains hidden or 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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This file contains hidden or 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
(\d{1,2} \w+ \d{4} \d{1,2}\:\d{1,2}\:\d{1,2} \w{3})\s+Transaction ID:\s+([\d\w]*)[\S\s.]*(?:You sent a payment of )[\$\£]?(\d+\.\d+) (\w{3}) to (.*) |
This file contains hidden or 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
// Creates the element timeline | |
function bucketAnimation(element) { | |
var tl = new TimelineMax(), | |
bucket = $(element); | |
tl | |
.to(bucket.find('p'), .5, { opacity: 0 }) | |
.to(bucket.find('ul'), 0, { opacity: 1 }) | |
.staggerFrom(bucket.find('li'), .4, { opacity: 0, y: 100, ease: Back.easeOut }, .15); | |
return tl; |
This file contains hidden or 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
.js-app .js-column .stream-item .tweet-timestamp a { font-size: 9px !important; } | |
.js-app .js-column .stream-item .account-link .account-inline .fullname { font-size: 11px !important } | |
.js-app .js-column .column-header .column-title .attribution { display: none; } | |
.js-app .js-column .column-header .column-title span { font-size: 10px !important; } | |
body .js-app .js-column article.stream-item .nbfc {font-size: 10px !important; line-height: 14px !important; } | |
.column-title-back .icon, .column-title-back .Icon { top: 18px !important; } |
This file contains hidden or 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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
MyPath = C:\Program Files (x86)\iRotate\iRotate.exe | |
#+!Up:: | |
Run %MyPath% /2:rotate=0 | |
Return |
This file contains hidden or 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
// Open the source image of an art piece's detail page. Simply paste into the code console or a bookmarklet. | |
javascript:(function(){window.open(getComputedStyle(document.getElementsByClassName("zoomWindow")[0],'').getPropertyValue('background-image').replace('url(\"', '').replace('\"\)', ''), "_self");})() |
This file contains hidden or 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
{ | |
"folders": | |
[ | |
{ | |
"file_exclude_patterns" :["config.rb", "Guardfile"], | |
"folder_exclude_patterns" :["_notes", ".sass-cache"], | |
"follow_symlinks": true, | |
"path": "/Volumes/projects/myproject/" | |
} | |
] |
This file contains hidden or 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).scroll(function() { | |
$('.navbar-fixed').addClass('scrolling'); | |
clearTimeout($.data(this, 'scrollTimer')); | |
$.data(this, 'scrollTimer', setTimeout(function() { | |
$('.navbar-fixed').removeClass('scrolling'); | |
}, 50)); | |
}); |
This file contains hidden or 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
module Haml::Filters::Php | |
include Haml::Filters::Base | |
def render(text) | |
<<END | |
<?php | |
#{text.rstrip.gsub("\n", "\n ")} | |
?> | |
END | |
end |
This file contains hidden or 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
# lorempixel | |
# Outputs a (random) image of specified dimensions | |
# from http://lorempixel.com/. | |
# Example: =lorempixel "300x150" | |
# | |
# Use :theme => 'category' | |
# to set a specific theme | |
def lorempixel(dimensions, opt = {}) | |
NewerOlder