This file contains 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
function type() { | |
for (var i = 0; i < arguments.length; i++) { | |
if (arguments[i] !== arguments[++i].constructor) throw new Error('Type Error'); | |
} | |
return arguments[1]; | |
} | |
/* | |
type( | |
String, this.name = "Henrique", |
This file contains 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
# Create a docker image with env var DISPLAY=:0 | |
# Save this image with docker save > firefox.tar | |
# Create this shell script in the same folder of firefox.tar | |
BASEDIR=$(dirname $(readlink -f "$0")) | |
docker load < $BASEDIR/firefox.tar | |
docker run --rm --net host -v $BASEDIR:/home/user firefox |
This file contains 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
#ifndef COOL_H | |
#define COOL_H | |
#include <stdlib.h> | |
typedef struct object { | |
char *value; | |
void (*set)(); | |
char* (*get)(); | |
} object; |
This file contains 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
/usr/bin/nvlc --no-video --global-key-faster Ctrl+] --global-key-slower Ctrl+[ --global-key-play-pause Ctrl+p $1 |
This file contains 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
#!/usr/bin/python | |
from gi import require_version | |
require_version('Gtk', '3.0') | |
require_version('WebKit2', '4.0') | |
from gi.repository import Gtk, WebKit2, Gdk | |
Gtk.init() | |
win = Gtk.Window() |
This file contains 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
browser w3m | |
# Newsboat colour scheme to work with the Nord palette | |
# from Arctic Studios - https://github.com/arcticicestudio/nord | |
# Tested with the iTerm2 Nord terminal colour scheme | |
# https://github.com/arcticicestudio/nord-iterm2 | |
# though should work with any terminal using the palette | |
color background color236 default | |
color listnormal color248 default |
This file contains 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
# ... | |
# Run startx on boot | |
if [[ ! $DISPLAY && XDG_VTNR -eq 1 ]]; then | |
exec startx | |
fi |
This file contains 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
console = { log: print }; | |
exports = {}; | |
require = function() { load(...arguments); return exports }; |
This file contains 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
{ | |
"titulo": "Receita de bolo da vovó", | |
"ingredientes": [ | |
"Farinha", "Ovo", "Açúcar", "Pipoca" | |
] | |
} |
This file contains 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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"net/http" | |
) | |
type gist struct { | |
ID string `json:"id"` |