Skip to content

Instantly share code, notes, and snippets.

View hpcorona's full-sized avatar

Hilario Pérez Corona hpcorona

  • Google
  • Washington
View GitHub Profile
@hpcorona
hpcorona / goppcast.go
Last active January 2, 2016 01:29
Simple Appcast generator.Just drop your update files in the same directory as this app is running and it will detect and generate appcast xml files and server the files.sample:http://localhost:23001/my_appWii search for: my_app* files and list them in the appcast file:my_app1.0.zipmy_app1.1.zipmy_app1.2.zipetc...
package main
import (
"fmt"
"io/ioutil"
"net/http"
"strconv"
"strings"
"time"
"os"
@hpcorona
hpcorona / ffmpeg_high_quality.sh
Created September 21, 2013 20:31
Create high quality recordings for Dota 2 videos, in 1/4 screen size
#usage:
#ffmpeg_high_quality.sh INPUT AUDIO_OFFSET OUTPUT
#sample: ffmpeg_high_quality.sh video_ 2 MySuperGank
#the AUDIO_OFFSET is the seconds of silence at the start (gap between recording started and sound starts, usually the time u get to close the console)
# INPUT is the startvideo INPUT data you typed in
ffmpeg -f image2 -framerate 30 -r 30 -i $1%04d.tga -itsoffset $2 -i $1.WAV -vcodec qtrle -r 24 -s 960x600 $3.mov
@hpcorona
hpcorona / enable-permissions
Created July 26, 2013 17:53
To Enable Visual Studio 2010 Project on Parallels Desktops
C:\Windows\system32>c:\windows\Microsoft.NET\Framework\v4.0.30319\CasPol.exe -m -ag 1.2 -url file://psf/Home\* FullTrust
C:\Windows\system32>c:\windows\Microsoft.NET\Framework\v4.0.30319\CasPol.exe -m -ag 1.2 -url file://y:\* FullTrust
C:\Windows\system32>c:\windows\Microsoft.NET\Framework\v2.0.50727\CasPol.exe -m -ag 1.2 -url file://psf/Home\* FullTrust
C:\Windows\system32>c:\windows\Microsoft.NET\Framework\v2.0.50727\CasPol.exe -m -ag 1.2 -url file://y:\* FullTrust
@hpcorona
hpcorona / run_screen.sh
Created July 4, 2013 03:21
Run a Script under a Screen run_screen.sh Scren_Name "my command to run"
screen -A -m -d -S "$1" "$2"
@hpcorona
hpcorona / gitserver.js
Last active December 19, 2015 05:19
Create a new Git-Server for local private usage
var GitServer = require('git-server');
var user1 = {
user: {
username: 'user1',
password: 'user1'
},
permissions: ['R', 'W']
};
@hpcorona
hpcorona / retrace.sh
Created May 28, 2013 22:45
Retrace a pro-guarded stack trace to it's original form
java -jar $ANDROID_HOME/tools/proguard/lib/retrace.jar "$1" "$2"
@hpcorona
hpcorona / tga2video.sh
Created May 6, 2013 05:54
Convert .tga files into a video
ffmpeg -f image2 -i $1%04d.tga -r 30 -vcodec mpeg4 -i $1.WAV -b 10000k $2.mpg
@hpcorona
hpcorona / extract_versionName.sh
Created April 29, 2013 16:00
Extract Version name from APK
aapt dump badging "$1" | grep package:\ name | sed "s/\(.*\)versionName='//" | sed "s/'//"
@hpcorona
hpcorona / iptables.rules
Created April 28, 2013 03:03
IP tables rules for l4d2 server
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p udp -m udp --dport 27000:27030 -j ACCEPT
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2