Skip to content

Instantly share code, notes, and snippets.

View iKlsR's full-sized avatar
😲
daemon.

iKlsR

😲
daemon.
View GitHub Profile
@iKlsR
iKlsR / Pascal.sublime-build
Created May 2, 2014 00:10
Pascal build system for st3
{
"cmd": ["fpc", "${file}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.pas",
"variants": [
{
"name": "Run",
"cmd": ["$file_base_name"],
@iKlsR
iKlsR / closeallwithoutsaving.jsx
Created October 19, 2014 22:27
close all open ps tabs without prompting to save
function closeCurrentWithoutSaving() {
if (app.activeDocument.length != 0)
app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
}
function closeAllWithoutSaving() {
while (documents.length != 0) {
for (var i = 0x00; i < documents.length; i++)
documents[i].close(SaveOptions.DONOTSAVECHANGES);
}
@iKlsR
iKlsR / webtext_automated.py
Last active August 29, 2015 14:09
Use your 30 free digicel texts from the comfort of your term
import mechanize, sys
class DigiWebTextDT(object):
def __init__(self):
self.br = mechanize.Browser()
# might want to change the locale for your region
self.br.open("https://webtext.digicelgroup.com/loginForm.do?country_code=JAM&language_code=en")
def get_credentials(self):
pass
@iKlsR
iKlsR / vimcasts_scraper.py
Created December 14, 2014 18:52
download all the videos on vimcasts.org in mp4 format
import json, urllib2
response = urllib2.urlopen("http://media.vimcasts.org/videos/index.json")
data = json.load(response)
number_of_videos = data.keys()
number_of_videos.sort(key=int)
urls = []
file_names = []
@iKlsR
iKlsR / java_class_launcher.bat
Last active August 29, 2015 14:14
drag and drop a .class file to execute it or set as the app to open
@echo off
REM http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/percent.mspx?mfr=true
start javaw %~n1
@iKlsR
iKlsR / pclc
Created March 29, 2012 20:03
c++ portable command line compiler for mingw, java and msvc
#include <Windows.h>
#include <iostream>
#include <string>
#include <conio.h>
std::string filename;
std::string parameters;
std::string new_filename;
std::string gcompiler = "g++";
@iKlsR
iKlsR / build.bat
Created June 25, 2012 18:21
build my ogl proj(mingw)
@echo off
echo building..
g++ -o core src/core.cpp -lfreeglut -lopengl32 -lglu32 -lglew32
copy C:\lib\freeglut\freeglut.dll
copy C:\lib\glew32\glew32.dll
core.exe
echo cleaning..
#include <vector>
#include <stdio.h>
#include <string>
#include <cstring>
#include <iostream>
#include <glm/glm.hpp>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
@iKlsR
iKlsR / obp
Created August 2, 2012 18:49
front page..
#include <iostream>
#include <stdio.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <GL/glew.h>
#include <GL/glfw.h>
@iKlsR
iKlsR / poor_me.c
Last active October 8, 2015 02:08
something something almost swizzly vectorish for the poor
#include <stdio.h>
typedef struct {
char t;
int x, y;
} swizzle;
swizzle image;