Skip to content

Instantly share code, notes, and snippets.

View h3ct0rjs's full-sized avatar
:shipit:

Héctor F. Jiménez. S h3ct0rjs

:shipit:
View GitHub Profile
@h3ct0rjs
h3ct0rjs / input.input
Created May 6, 2016 19:00
1337 Leet maze.
4
4 5 2
..#..
.C#C.
##..#
..C#C
1 1
4 1
6 2 5
##
@h3ct0rjs
h3ct0rjs / ToDo.txt
Last active May 10, 2016 20:50
What can we add to the Hecky mp3 script!!???
-Define colors like a Constant.
-Verify if the tools needed ffmpeg, curl exist in the machine...
-make it multiplatform in Unix, and Linux distros.
* What os are you running, I need to verify this.
* At least add support to Debian and derivatives, openbsd a derivatives.
-File Format Convertions.
-High Quality
-Multiple options of output file format Flv, ogg, wma...etc.
-What is the best aproach to convert this on the fly ... or just wait until it download all the music mp3 files.
@h3ct0rjs
h3ct0rjs / inputbox.py
Created June 10, 2016 14:49
Ejemplo de Cuadro de Entrada.
import pygame, pygame.font, pygame.event, pygame.draw, string
from pygame.locals import *
def get_key():
while 1:
event = pygame.event.poll()
if event.type == KEYDOWN:
return event.key
else:
pass
@h3ct0rjs
h3ct0rjs / firewall-ufw
Created July 29, 2016 21:45 — forked from yourdesigncoza/firewall-ufw
UFW - Uncomplicated Firewall
# The Uncomplicated Firewall (ufw) is a frontend for iptables and is particularly well-suited for host-based firewalls. ufw provides a framework for managing netfilter, as well as a command-line interface for manipulating the firewall.
# resources
# https://wiki.ubuntu.com/UncomplicatedFirewall
# IMPORTANT : add your own data or parameters, I make use of double segments [[ your variable ]]. eg. ssh root@[[ 96.172.44.11 ]] should be replaced with ssh root@888.88.88.88 where "888.88.88.88" is your value, variable etc. I have a habit of using ":::" to indicate line ending and end of paragraph, crazy I know but be warned its just how I write ::: All notes are for my own use & should you use any it's at your own risk, it's NOT a Tutorial :::
# Enable and configure Firewall - ufw
# ufw firewall is installed by default on Ubuntu 12.04. gufw is a handy GUI frontends for ufw to manage the firewall.
@h3ct0rjs
h3ct0rjs / node-on-ec2-port-80.md
Created August 31, 2016 02:47 — forked from kentbrew/node-on-ec2-port-80.md
How I Got Node.js Talking on EC2's Port 80

The Problem

Standard practices say no non-root process gets to talk to the Internet on a port less than 1024. How, then, could I get Node talking on port 80 on EC2? (I wanted it to go as fast as possible and use the smallest possible share of my teeny tiny little micro-instance's resources, so proxying through nginx or Apache seemed suboptimal.)

The temptingly easy but ultimately wrong solution:

Alter the port the script talks to from 8000 to 80:

}).listen(80);
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
# Defaults env_reset
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
"D\xB9\xBB \xE2\x85\x13x\xBBX\xB3\xA3\xBBFD\xDF;\x90\xF8\xC8\xA5\x9F\x84\xEA\x08v\x8ADH\xFD\x89\xE9rwA\x88\xC5\x97\xC5C\x99\xF2\x99\x0Bj4j\xE7\x17j\x9D\xB3\x07\x98\xE3s\xB7\xF3\xECp\xFE\x9CQ\xDF"
\xD2\xD2\xAB\xD1-\xA8\x5C\xA4[\xEC\x16t\xDAV}\x9A\xB8\xBF\xF2~\x7F'?>Gizh\x86/\xC7Lk\x82\xA9\xE8\xD8*\xE5\xC3\xB5\xB3\x1F\xFF\xF0.Y\xC3\xB1\xE1@*6iX\xD2\x01\x9C\xB9\x909"
@h3ct0rjs
h3ct0rjs / cracking.md
Created December 11, 2016 18:07 — forked from vertexclique/cracking.md
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@h3ct0rjs
h3ct0rjs / books.html
Last active December 26, 2016 03:34
Old cgi, this will show you the number of the last book, easy to understand but difficult if you need at least the same thing in multiple html pages.
<html>
<head><title>Books</title></head>
<body>
<h1>Books</h1>
<ul>
{% for book in book_list %}
<li>{{ book.name }}</li>
{% endfor %}
</ul>
@h3ct0rjs
h3ct0rjs / display.sh
Last active February 5, 2017 15:44
Adaptation from Anachron's original block to my computer laptop acer aspire one.
#!/bin/bash
xrandrOut=$(xrandr)
vgaName=$(echo "${xrandrOut}" | grep -i 'VGA' | awk '{print $1}')
lvdsName=$(echo "${xrandrOut}" | grep -i 'LVDS' |2 awk '{print $1}')
activeDisplays=$(echo "${xrandrOut}" | grep " connected" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/" | tr -s '\n' ' ')
displayFile='/tmp/.displays'