Skip to content

Instantly share code, notes, and snippets.

Verifying that +basti is my Bitcoin username. You can send me #bitcoin here: https://onename.io/basti
<!-- @if dist=false -->
<script>
var script1 = document.createElement('script');
var script2 = document.createElement('script');
var body = document.getElementsByTagName("body")[0];
script1.src = '//'+window.location.hostname+':3000/socket.io/socket.io.js';
script2.src = '//'+window.location.hostname+':3001/client/browser-sync-client.0.6.0.js';
script1.onload = function() {
window.___socket___ = io.connect('//'+window.location.hostname+':3000');
body.appendChild(script2);
@raucao
raucao / typekit.js
Last active February 12, 2020 06:25
Improved Typekit embed code
(function(d) {
var tkTimeout=3000;
if(window.sessionStorage){if(sessionStorage.getItem('useTypekit')==='false'){tkTimeout=0;}}
var config = {
kitId: 'a1b2c3f4',
scriptTimeout: tkTimeout
},
h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";if(window.sessionStorage){sessionStorage.setItem("useTypekit","false")}},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='//use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
})(document);
gconftool-2 --set /apps/gnome-terminal/profiles/Default/foreground_color --type string "#f7f7f7"
gconftool-2 --set /apps/gnome-terminal/profiles/Default/background_color --type string "#282828"
gconftool-2 --set /apps/gnome-terminal/profiles/Default/bold_color --type string "#f7f7f7"
gconftool-2 --set /apps/gnome-terminal/profiles/Default/palette --type string "#000000:#c75646:#8eb33b:#d0b03c:#72b3cc:#c8a0d1:#218693:#b0b0b0:#5d5d5d:#e09690:#cdee69:#ffe377:#9cd9f0:#fbb1f9:#77dfd8:#f7f7f7"
@raucao
raucao / site.nginxconf
Last active November 18, 2021 22:12
Nginx log format for detailed JSON entries
log_format json '{"ip":"$remote_addr",'
'"time":"$time_local",'
'"host":"$host",'
'"method":"$request_method",'
'"uri":"$uri",'
'"status":$status,'
'"size":$body_bytes_sent,'
'"referer":"$http_referer",'
'"ua":"$http_user_agent"}';
@raucao
raucao / github-issues.css
Last active December 15, 2015 20:29
User style for GitHub issues
@-moz-document url-prefix('https://github.com/') {
.issues-list .issue-name a {
font-size: 14px !important;
color: #333 !important;
}
.issues-list li.read .issue-name a {
color: #555 !important;
}
.issues-list .type-icon {
display: none !important;
module MiniTest
class Spec
class << self
alias_method :context, :describe
end
end
end
@raucao
raucao / uri.js
Created September 6, 2012 10:14 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@raucao
raucao / gist:3406890
Created August 20, 2012 19:18 — forked from mislav/gist:3313773
hosting one's own email

I want to get off Gmail for two reasons:

  1. my own *@mislav.net address
  2. to get my email under my own control so I can write scripts to process/analyze it

I've asked on Twitter what software should I use.
Here are the aggregated suggestions.

SMTP

$.getJSON("http://tos-dr.info/services/facebook.json").done(function(data) {
return console.log(JSON.stringify(data));
});