Skip to content

Instantly share code, notes, and snippets.

View negatronGister's full-sized avatar

negatronGister

View GitHub Profile
@negatronGister
negatronGister / .htaccess
Created September 13, 2017 15:42
Allow .well-known
RewriteRule /\.well-known|^\.well-known - [L]
MakeCanvasses = do ->
run = ->
$canvasContainer = $ '#canvas-container', gv.$wrapper
$buttons = gv.$buttonContainer.children '.follow-button-container'
$buttons.each ->
console.log 'make canvas'
console.log $(this)
canvas = createCanvas $(this)
$canvasContainer.append canvas.$el
@negatronGister
negatronGister / gist:74f03c80420bb1788423
Created December 1, 2015 18:14
Webfaction default node bin/stop
mkdir -p /home/USERNAME/webapps/APPNAME/run
pid=$(/sbin/pidof /home/USERNAME/webapps/APPNAME/bin/node)
if echo "$pid" | grep -q " "; then
pid=""
fi
if [ -n "$pid" ]; then
user=$(ps -p $pid -o user | tail -n 1)
if [ $user = "USERNAME" ]; then
kill "$pid"
rm -f /home/USERNAME/webapps/APPNAME/run/node.pid
@negatronGister
negatronGister / Git post-receive hook for webfaction
Created September 13, 2015 09:21
Git post-receive hook for deploying on webfaction
# *** INSTRUCTIONS ********
# $ cd repo.git
# $ cat > hooks/post-receive
# paste this
# Ctrl+D
# chmod +x hooks/post-receive
# ***************************
#!/bin/sh
GIT_WORK_TREE=/home/USERNAME/webapps/APPNAME/app git checkout -f master
@negatronGister
negatronGister / gist:82c8ae4b0462b8ab1fec
Created July 12, 2015 12:39
Amazon S3 static permissions
{
"Version":"2012-10-17",
"Statement":[{
"Sid":"AddPerm",
"Effect":"Allow",
"Principal": "*",
"Action":["s3:GetObject"],
"Resource":["arn:aws:s3:::example.com/*"
]
}
@negatronGister
negatronGister / force-non-www
Created March 6, 2015 11:41
Force non-www redirect in .htaccess
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
@negatronGister
negatronGister / reset password - processwire
Created September 28, 2014 10:52
reset password - processwire
$u = $users->get('admin'); // or whatever your username is
$u->of(false);
$u->pass = 'your-new-password';
$u->save();
.hyphen-list {
margin-left: 16px;
li:before {
content:"-";
position:relative;
margin-left: -7px; /* optional, for multiline li element */
left: -8px;
}
@negatronGister
negatronGister / better font rendering
Created February 14, 2014 09:47
better font rendering
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
@negatronGister
negatronGister / .git-ftp-ignore
Created February 13, 2014 12:55
git ftp ignore
README.md
package.json
offline_resources/
node_modules/
.sass-cache/
Gruntfile.js