Skip to content

Instantly share code, notes, and snippets.

View abaez's full-sized avatar

Alejandro Baez abaez

View GitHub Profile
@abaez
abaez / mineacraft-install.sh
Last active April 16, 2022 02:48
Simple Install script for Minecraft on linux of course ;)
#!/bin/bash
###### NOTE YOU HAVE TO RUN IN root
# cd "$(dirname ${BASH_SOURCE[0]})"
# dir=${PWD##*/}
dir="/opt/minecraft"
@abaez
abaez / sublime-install.sh
Created January 8, 2013 08:41
Simple install from Sublime Text 2
#!/bin/bash
#ONLY install 64bit version
#check stuff
# cd "$(dirname ${BASH_SOURCE[0]})"
# dir=${PWD##*/}
dir=/opt
cd $dir;
@abaez
abaez / love_binary.pl
Created January 15, 2013 05:55
A binary builder for Love2D
#!/usr/bin/perl
#perl script to make a binary file for love game
#zip directory for all, but done on linux ;)
sub zip {
21chdir $_[0] or die "Can't change to $_[0] $!\n"; #failsafe
my $file ='../${PWD##*/}'; #need to do it this form so it gets the exact directory
system "zip -r $file.love * ";
}
@abaez
abaez / AnonFunc.sublime-snippet
Last active December 11, 2015 06:49
Lua: Sublime Snippets
<snippet>
<content><![CDATA[
function(${1:...})
${2:--body}
end
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>functiona</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.lua</scope> <!--no need since using directory for scope ;) -->
@abaez
abaez / For.sublime-snippet
Created January 18, 2013 03:34
Python: Sublime Snippets
<snippet>
<tabTrigger>for</tabTrigger>
<scope>source.python</scope>
<description>For Loop</description>
<content><![CDATA[
for ${1:x} in ${2:obj}:
${3:pass}
]]></content>
</snippet>
@abaez
abaez / Preferences.sublime-settings
Created January 30, 2013 00:10
sublime: user preferences
{
"color_scheme": "Packages/Dayle Rees Color Schemes/Laravel.tmTheme",
"font_face": "Inconsolata",
"font_size": 12,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages": [],
"rulers": [79],
"theme": "Nil.sublime-theme",
"trim_trailing_white_space_on_save": true
@abaez
abaez / os_info.py
Created February 6, 2013 05:43
Simple OS detail for a certain someone...
#!/usr/bin/env python
#from os import *
import os
def getOS():
user = [ os.getlogin(), os.geteuid(), os.ctermid()]
running = [os.ctermid(), os.uname()]
[print(x) for x in [user, running]]
os.system("whatis qtile; whereis qtile")
@abaez
abaez / pomodoro.lua
Last active December 15, 2015 08:19 — forked from nistude/pomodoro.lua
pomodoro for awesome 3.5.
local wibox = require("wibox")
local awful = require("awful")
local naughty = require("naughty")
pomodoro = {}
p = pomodoro
-- quick convert to seconds
local tosec = function(min) return min * 60 end
@abaez
abaez / build.py
Created April 4, 2013 18:45
A quick build process for qmake on Qt
#!/usr/bin/env python
import os,subprocess,shutil
def move():
return input("Give me the directory of work.\n")
def build():
if os.path.exists("./build"):
shutil.rmtree("./build")
@abaez
abaez / vlcStream.pl
Created April 10, 2013 15:43
a vlc sdp stream script
#!/usr/bin/perl
# Stream set for vlc
use IO::Handle;
##### Phase1
# Definitions for the stream
$path = "/data/Videos";