Skip to content

Instantly share code, notes, and snippets.

@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"}';
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 / 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);
<!-- @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);
Verifying that +basti is my Bitcoin username. You can send me #bitcoin here: https://onename.io/basti
@raucao
raucao / nginx-lua-s3.nginxconf
Last active September 8, 2020 01:29
Nginx proxy to S3
location ~* ^/s3/(.*) {
set $bucket '<REPLACE WITH YOUR S3 BUCKET NAME>';
set $aws_access '<REPLACE WITH YOUR AWS ACCESS KEY>';
set $aws_secret '<REPLACE WITH YOUR AWS SECRET KEY>';
set $url_full "$1";
set_by_lua $now "return ngx.cookie_time(ngx.time())";
set $string_to_sign "$request_method\n\n\n\nx-amz-date:${now}\n/$bucket/$url_full";
set_hmac_sha1 $aws_signature $aws_secret $string_to_sign;
set_encode_base64 $aws_signature $aws_signature;
@raucao
raucao / my.css
Created January 6, 2015 15:50 — forked from anonymous/my.css
background: linear-gradient(270deg, #219f7e, #3d9cd1);
background-size: 400% 400%;
-webkit-animation: AnimationName 30s ease infinite;
-moz-animation: AnimationName 30s ease infinite;
-o-animation: AnimationName 30s ease infinite;
animation: AnimationName 30s ease infinite;
@-webkit-keyframes AnimationName {
    0%{background-position:0% 50%}
    50%{background-position:100% 50%}
    100%{background-position:0% 50%}
@raucao
raucao / fingerprint.txt
Created July 9, 2015 17:28
Current 5apps.com wildcard certificate
A2:69:DC:6F:11:BE:BE:54:36:03:58:04:97:BC:76:6C:8F:11:1A:58
Easy work:
1 complain
2 pretend
3 blame
4 procrastinate
5 resent
6 ignore
Hard work:
@raucao
raucao / wifi.json
Last active January 22, 2016 17:58 — forked from beanieboi/wifi.json
Hackerbeach Wifi Passwords
{
"places": [
{
"name": "Surf Shak",
"SSID": "Bar Surf",
"password": "shak2525"
},
{
"name": "Hostal Rutamar",
"SSID": "HOSTAL RUTAMAR",