Skip to content

Instantly share code, notes, and snippets.

View AlphaTechnolog's full-sized avatar

Franklin Gabriel Guerra AlphaTechnolog

View GitHub Profile
@591342534
591342534 / SimpleHTTPServerWithUpload.py
Created May 27, 2019 08:13 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/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.
"""
@rkuslak
rkuslak / GithubMonokai.js
Last active September 2, 2021 19:19
Github Monokai
// ==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');
@ps1dr3x
ps1dr3x / xset-led-wayland.sh
Created October 26, 2018 17:44
Turn on keyboard backlight/leds on wayland (xset led 3 alternative)
# "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'
@wooken
wooken / alacritty-papercolor-light.yml
Last active March 31, 2022 05:56
PaperColor colorscheme for Alacritty
# 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
@Hristiyanii
Hristiyanii / SecondstoClock
Created October 15, 2017 08:22
Lua function to convert seconds to a clock string
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
@radxene
radxene / color_output.c
Created August 13, 2017 11:23
Colored output in C
/**
* 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"
@mamonu
mamonu / qcow2vdi.sh
Last active April 27, 2025 12:25
convert a qcow2 vm to a VirtualBox vm format
qemu-img convert -O vdi gnome.qcow2 gnome.vdi
#if its a raw image then:
VBoxManage convertdd opnstk.raw VBox.vdi --format VDI