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
# run once | |
git log --graph --pretty=format:'%C(yellow)%cD%Creset - %Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
# OR: set config: | |
git config --global alias.lg "log --graph --pretty=format:'%C(yellow)%cD%Creset - %Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" |
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
/** | |
* parse a string and return the appropriate embed code | |
* @return string | |
*/ | |
public function parseMedia($string) | |
{ | |
if (empty($string)) return false; | |
$rgx = '/^https*:\/\/(?:.*?)\.?(youtube|vimeo)\.com\/(watch\?[^#]*v=(\w+)|(\d+))/'; |
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
tell application "System Events" | |
repeat with theProcess in processes | |
if not background only of theProcess then | |
tell theProcess | |
set processName to name | |
set theWindows to windows | |
end tell | |
set windowsCount to count of theWindows | |
if processName is not "Finder" and processName is not "Automator" then |
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
on run {input, parameters} | |
tell application "System Events" to set frontmost of process "ZwiftApp" to true | |
tell application "System Events" | |
keystroke "M" | |
keystroke "Ride on!!" | |
keystroke return | |
end tell | |
return input |
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
.row { | |
> .col-sm-4 { | |
@media screen and (min-width: @screen-sm-min){ | |
&:nth-child(3n + 1) { | |
clear: left; | |
} | |
} | |
} | |
> .col-sm-3 { | |
@media screen and (min-width: @screen-sm-min){ |
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
^((?!Security|XHR).)*$ |
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
// smooth scroll | |
$('a[href*="#"]:not([href="#"])').on("click", function() { | |
if (location.pathname.replace(/^\//,'') === this.pathname.replace(/^\//,'') && location.hostname === this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
if (target.length) { | |
var toppie = target.offset().top - 50; | |
$('html,body').animate({ | |
scrollTop: toppie | |
}, 600); |
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 elements = document.querySelectorAll('.socialshares a'); | |
Array.prototype.forEach.call(elements, function(el, i){ | |
el.onclick = function(elaction) { | |
elaction.preventDefault(); | |
window.open( el.attributes.href.value, '', 'width=600,height=300' ); | |
} | |
}); |
NewerOlder