Skip to content

Instantly share code, notes, and snippets.

View twilight1794's full-sized avatar
πŸ§ƒ
Sic parvis, magna

Giovanni Alfredo Garciliano DΓ­az twilight1794

πŸ§ƒ
Sic parvis, magna
View GitHub Profile
@thomasjslone
thomasjslone / windows_shell.rb
Created June 4, 2016 16:37
Windows Shell io loop class is portable and can be used by multiple classes to make consol apps
## this is a Handy Dandy shell class, it controls stdin/out flow allowing your programs
## to pass this class around and start and stop it with ease, I lost my elaborate version of this class so I just wipped this
## one up with haste. Feel free to offer suggestions.
##
## The object that becomes parent here usually has a @api variable, which processes the input to the app, i sometimes call it the
## application input firewall.
##
class Windows_Shell
def initialize(parent)
@parent = parent
@ivanperez-keera
ivanperez-keera / Associate org-mode files with emacs.md
Last active August 7, 2021 10:06
Associate Org-mode files with emacs (on Linux)

On linux, files tend to be identified by type, not extension.

org-mode files are text files, but only a few editors support org-mode (emacs, vim, etc.)

This file can be used to associate org-mode files to a specific editor (like emacs), while using other editors for plain text files.

  • Save as /usr/share/mime/packages/org.xml;
  • Run
@ManzDev
ManzDev / conky.conf
Last active June 11, 2018 03:47
Conky Laptop Widget
# conky configuration
# edited by twitter.com/Manz (based on [email protected])
# set to yes if you want Conky to be forked in the background
background no
# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
@md5
md5 / 00_README.md
Last active May 11, 2025 13:13
Demonstration Docker config for Wordpress on PHP-FPM behind Nginx

Proof of concept setup for Wordpress running under PHP-FPM with an Nginx frontend

Usage

Build a copy of this image:

git clone git://github.com/d9206eacb5a0ff5d6be0.git docker-nginx-fpm
cd docker-nginx-fpm
docker build -t nginx-fpm .
@trey
trey / git-commit-author-rewrite.md
Last active December 18, 2024 05:46
Change the email address for a git commit.

Change the email address for a git commit.

$ git commit --amend --author="Author Name <[email protected]>"

or

$ git commit --amend --reset-author
@gabrielkfr
gabrielkfr / bash-fecha-hora-actual
Created August 26, 2013 04:46
Script bash para mostrar la fecha y la hora actual.
#!/bin/bash
DIA=`date +"%d/%m/%Y"`
HORA=`date +"%H:%M"`
echo "Hoy es el $DIA y la hora actual es $HORA!"
@anabelle
anabelle / mac2wep.py
Last active November 26, 2024 21:49
Script para averiguar claves de redes infinitum de 4 digitos.
#!/usr/bin/env python
#-*- encoding: utf-8 -*-
# mac2wepkey Huawei HG520 by [email protected] - 12/2010
# m2wkuvz (m2wkuvz ubuntu version) by [email protected] - 07/2012
import os, sys
def uso():
os.system("clear")
@ijy
ijy / xhtml-to-markdown.xsl
Created July 21, 2013 14:29
XHTML to Markdown converter.
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- XHTML-to-Markdown converter by Andrew Green, Article Seven, http://www.article7.co.uk/ -->
<!-- This work is licensed under the Creative Commons Attribution-ShareAlike License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. -->
<xsl:stylesheet version='1.0' xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:output method='text' encoding='utf-8'/>
@cowboy
cowboy / eval-is-evil.js
Last active May 12, 2020 11:56
A JavaScript "eval is evil" narrative by way of the "pass a string to setTimeout" anti-pattern...
// An object with a property and a method.
var obj = {
name: "Ben",
logName: function() {
console.log(this.name);
}
};
// And another global variable, for good measure.
var name = "Whoops";
@fabiand
fabiand / SimpleHTTPPutServer.py
Last active November 26, 2024 06:30
A simple HTTP Server supporting put (python3)
# python3 -m SimpleHTTPPutServer 8080
from http.server import HTTPServer, SimpleHTTPRequestHandler
class PutHTTPRequestHandler(SimpleHTTPRequestHandler):
def do_PUT(self):
print(self.headers)
length = int(self.headers["Content-Length"])
path = self.translate_path(self.path)
with open(path, "wb") as dst: