This file contains hidden or 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/env python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" |
This file contains hidden or 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
// ==UserScript== | |
// @name GitHub PRE Themer | |
// @version 1 | |
// ==/UserScript== | |
function addGlobalStyle(css) { | |
var head, style; | |
head = document.getElementsByTagName('head')[0]; | |
if (!head) { return; } | |
style = document.createElement('style'); |
This file contains hidden or 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
# "input0::scrolllock" might be different (?) | |
# On | |
sudo sh -c 'echo 1 > /sys/class/leds/input0::scrolllock/brightness' | |
# Off | |
# sudo sh -c 'echo 0 > /sys/class/leds/input0::scrolllock/brightness' |
This file contains hidden or 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
# PaperColor Light 256 - alacritty color config | |
# https://github.com/NLKNguyen/papercolor-theme | |
# https://www.reddit.com/r/vim/comments/36xzbs/vim_paper_color_theme_inspired_by_googles/crqbfpa/ | |
colors: | |
# Default colors | |
primary: | |
background: '0xeeeeee' | |
foreground: '0x4d4d4c' | |
# Colors the cursor will use if `custom_cursor_colors` is true |
This file contains hidden or 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 SecondsToClock(seconds) | |
local seconds = tonumber(seconds) | |
if seconds <= 0 then | |
return "00:00:00"; | |
else | |
hours = string.format("%02.f", math.floor(seconds/3600)); | |
mins = string.format("%02.f", math.floor(seconds/60 - (hours*60))); | |
secs = string.format("%02.f", math.floor(seconds - hours*3600 - mins *60)); | |
return hours..":"..mins..":"..secs |
This file contains hidden or 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
/** | |
* For compiling program run: | |
* gcc -std=c99 color_output.c -o color_output.run | |
*/ | |
#include <stdio.h> | |
#define ANSI_RESET_ALL "\x1b[0m" | |
#define ANSI_COLOR_BLACK "\x1b[30m" | |
#define ANSI_COLOR_RED "\x1b[31m" |
This file contains hidden or 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
qemu-img convert -O vdi gnome.qcow2 gnome.vdi | |
#if its a raw image then: | |
VBoxManage convertdd opnstk.raw VBox.vdi --format VDI |
NewerOlder