Skip to content

Instantly share code, notes, and snippets.

View DeviaVir's full-sized avatar
🏴‍☠️

Chase DeviaVir

🏴‍☠️
View GitHub Profile
@DeviaVir
DeviaVir / dabblet.css
Created April 18, 2012 12:09 — forked from LeaVerou/dabblet.css
Vertical centering with Flexbox + margin fallback
/**
* Vertical centering with Flexbox + margin fallback
* Lea Verou & David Storey
*/
html, body { height: 100%; }
body {
width: 100%; /* needed for FF */
margin: 0;
@DeviaVir
DeviaVir / twitter_avatars.php
Created April 21, 2012 12:21
Grab the mostly higher quality image from Twitter users
<?PHP
# Requires the (by default enabled) simplexml PHP library
$username = 'deviavir';
$xml = simplexml_load_file( "http://twitter.com/users/".$username.".xml" );
$img = str_replace( '_normal', '', $xml->profile_image_url );
?>
<img src="<?=$img?>" />
@DeviaVir
DeviaVir / dabblet.css
Created May 14, 2012 07:20 — forked from LeaVerou/dabblet.css
Text masking — The SVG way
/**
* Text masking — The SVG way
*/
svg {
width: 6em; height: 1.5em;
font: 900 500%/1.2 'Arial Black', sans-serif;
}
text { fill: url(#wood); }
@DeviaVir
DeviaVir / filters.sass
Created June 6, 2012 20:39
Filters SASS
@mixin filter( $var )
-webkit-filter: $var
-moz-filter: $var
-ms-filter: $var
-o-filter: $var
filter: $var
a
&.on
@include filter( sepia(100%) hue-rotate(33deg) contrast(69%) saturate(2) )
@DeviaVir
DeviaVir / rewrite to www
Created June 7, 2012 21:45
nginx_rewrite.conf
if ($host ~* ^([a-z0-9\-]+\.(com|net|org|gs))$) {
set $host_with_www www.$1;
rewrite ^(.*)$ http://$host_with_www$1 permanent;
}
# Replace com|net|org|gs with your extensions
@DeviaVir
DeviaVir / emoticons.sass
Created June 30, 2012 23:51
SASS: Add a folder with emoticons
$icon-map: sprite-map("chat/emoticons/*.png")
$list: angry bluecry blueshock bluexlshock crazy cry crylaugh dead grin happy kiss lovehappy no nodont nowkiss ohcrywhy ohgodno sick sleepyhappy smirk stupidhappy unhappy unhappycry what whocares wink xlangry xlhappy xlunhappy xxlhappy
.emoticon
background: $icon-map
width: 24px
height: 24px
background-size: 24px 744px
@each $smiley in $list
@DeviaVir
DeviaVir / gist:3076900
Created July 9, 2012 14:34
NodeJS make
[root@141-138-141-225 nodejs]# make CFLAGS+=-fno-builtin-memcpy CXXFLAGS+=-fno-builtin-memcpy V=1
python tools/gyp_node -f make
make -C out BUILDTYPE=Release
make[1]: Entering directory `/opt/nodejs/out'
cc '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DHTTP_PARSER_STRICT=0' '-DNDEBUG' -I../deps/http_parser -Wall -pthread -m64 -O3 -fdata-sections -ffunction-sections -fno-strict-aliasing -MMD -MF /opt/nodejs/out/Release/.deps//opt/nodejs/out/Release/obj.target/http_parser/deps/http_parser/http_parser.o.d.raw -fno-builtin-memcpy -c -o /opt/nodejs/out/Release/obj.target/http_parser/deps/http_parser/http_parser.o ../deps/http_parser/http_parser.c
rm -f /opt/nodejs/out/Release/obj.target/deps/http_parser/libhttp_parser.a && ar crsT /opt/nodejs/out/Release/obj.target/deps/http_parser/libhttp_parser.a /opt/nodejs/out/Release/obj.target/http_parser/deps/http_parser/http_parser.o
cc '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DL_ENDIAN' '-DOPENSSL_THREADS' '-DPURIFY' '-D_REENTRANT' '-DOPENSSL_NO_DTLS1'
@DeviaVir
DeviaVir / dabblet.css
Last active October 8, 2015 00:58
DualDev Logo
/**
* DualDev Logo
*/
html, body {
height: 100%;
}
body {
margin: 0;
@DeviaVir
DeviaVir / dabblet.css
Last active October 8, 2015 05:08
Hosted by DualDev Logo
/**
* Hosted by DualDev Logo
*/
html, body {
height: 100%;
}
body {
margin: 0;
@DeviaVir
DeviaVir / dabblet.css
Last active October 8, 2015 05:08
Hosted by DualDev Logo
/**
* Hosted by DualDev Logo
*/
html, body {
height: 100%;
}
body {
margin: 0;