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
html, html * { | |
cursor:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAABOCAYAAACOqiAdAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABmcSURBVHgB7VxZjFZFm67zddPQDTQ7ioKNgAI6iAvg7xhFMzqOmXChE00cMjEmxqiJTuKFMXOjziRzOzGDiRovjEtM3DEucV9wQQfjvrEvArI10DRNA31OzfNUv2/1e+o7Dd0s/vNP/krOd86pvZ5616o6n3N/DccUMvdnCt77DEGfS2mMlzgv75l51z77vuyZd39w+COBC20RAAWM4YEHHshwBUBwt/Gly8Z7g3Qvpj7TZ/cHhUZ3koMOioGk8eCDD4Zovt5www0BLN6ff/559+OPP4Z8O3bsYJonqJLXIy3TeNbB93PPPTdgiPcAftKWtnNSwkmhOENVmQ7Mpn/44Yc13q+44oqWM88889xarUYEWhobG9tQrgVJE5P6duDajqsL1wbkWQcQN3z22WfbmU4Aea+iRneSwgkFTvpckl1CDaSUQEmLFy8+p7m5eTbyLGhqapo8YsSIA0OHDj00cuTIg62trQcbGhrylpaWHq2SP11dXUO6u7uHHDp0qGHfvn1DOzo6WhA3NM/zTUVR/IR631y6dOkOTAip1AtrexUDMpEnFMQTDVwmgtwrlUnnh0+bNm0eKGshwJp56qmnto8ZM6Zr3LhxB6rqQT4HQHo7iOr4rLPBdz4zbteuXc0AbcTu3btHHjx4cGtPT88bDz300DJMgieIvV0KnYoK6EQBeNzAyWxmIo+iMFeZdMstt/wDWPCfRo0a5dra2naOHTu2i8C4Pg0ZtSN/CIgCJ/liU4jLGIcrPGs8y+7cubNlw4YN4/fs2dMF6nzp6aef/oiJEyZM8GTl+++/X9nh/wRwmcozuavsym6++ebZoK7bAFjLGWecsRMD6HInIFhqTOID |
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
Layer::isOverlapping = (targetLayer, offset = 0) -> | |
if @screenFrame.x + @width + offset >= targetLayer.screenFrame.x && | |
@screenFrame.x - offset <= targetLayer.screenFrame.x + targetLayer.width && | |
@screenFrame.y + @height + offset >= targetLayer.screenFrame.y && | |
@screenFrame.y - offset <= targetLayer.screenFrame.y + targetLayer.height | |
true | |
else | |
false | |
Layer::isInside = (targetLayer, offset = 0) -> |
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
# Overrides rgba alpha values with a new alpha | |
const alpha = (color, opacity) => | |
color.replace(/[\d\.]+\)$/g, opacity+')') | |
alpha(gray100, 0.4) | |
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
var script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = 'https://rawgithub.com/marmelab/gremlins.js/master/gremlins.min.js'; | |
document.head.appendChild(script); | |
setTimeout(function(){ | |
gremlins | |
.createHorde() | |
.unleash(); |
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
#!/bin/sh | |
git --work-tree=/var/www/html/ --git-dir=/var/repo/site.git checkout -f master -- dist/ | |
cd /var/www/html/ | |
cp -rRp dist/. . | |
rm -rf dist | |
// -rRp recursive copy files from /dist to current folder. Then delete the empty folder |
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
#!/bin/sh | |
git --work-tree=/var/www/html/ --git-dir=/var/repo/repoName.git checkout -f master -- _site/ | |
cd /var/www/html/ | |
cp -rRp _site/. . | |
rm -rf _site |
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
wget -m -k -K -E -l 7 -t 6 -w 5 http://www.website.com | |
A little clarification regarding each of the switches: | |
-m Essentially, this means “mirror the site”, and it recursively grabs pages & images as it spiders through the site. It checks the timestamp, so if you run wget a 2nd time with this switch, it will only update files/pages that are newer than the previous time. | |
-k This will modify links in the html to point to local files. If instead of using things like page2.html as links throughout your site you were actually using a full http://www.website.com/page2.html you’ll probably need/want this. I turn it on just to be on the safe side – chances are at least 1 link will cause a problem otherwise. | |
-K The option above (lowercase k) edits the html. If you want the “untouched” version as well, use this switch and it will save both the changed version and the original. It’s just good practise in case something is awry and you want to compare both versions. You can always delete the one you didn’t want later. |
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
# look in server logs for a single keyword match | |
grep "file" /var/log/apache2/access.log | |
# IP lookup | |
ipinfo.io/IP_ADDRESS |
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
# Go through Sketch files and delete autosave history without removing other items from .DocumentRevisions-V100 | |
mkdir -pv ~/.Trash/SketchAutosaveHistory && sudo find /Volumes/Macintosh\ HD/.DocumentRevisions-V100/ -name *.sketch -exec mv "{}" ~/.Trash/SketchAutosaveHistory/ \; |
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
[].forEach.call(document.querySelectorAll("*"),function(a){a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)}) |