Skip to content

Instantly share code, notes, and snippets.

@Roger
Roger / gist:850281
Created March 2, 2011 01:23
blackmagic
rand = lambda: __import__('os').urandom(1024*1024)
magic = lambda x: __import__('re').compile('(%s)'%chr(int(x*2)))
print(''.join([magic(i ).findall(rand())[0] for i in \
[60.5, 55.5, 58.5, 16.0, 54.0, 55.5, 57.5, 50.5]]))
diff --git a/tslib/webgl/turbulenzengine.ts b/tslib/webgl/turbulenzengine.ts
index 4d455fd..4edcf00 100644
--- a/tslib/webgl/turbulenzengine.ts
+++ b/tslib/webgl/turbulenzengine.ts
@@ -101,7 +101,7 @@ class WebGLTurbulenzEngine implements TurbulenzEngine
clearInterval(i)
{
- return window.clearInterval(i);
+ window.clearInterval(i);
(env)┌(roger@quorra)-(01:20am)-(⭠master)
└(%:~/gits/turbulenz_engine) which node
/home/roger/gits/turbulenz_engine/env/bin/node
(env)┌(roger@quorra)-(01:20am)-(⭠master)
└(%:~/gits/turbulenz_engine) node --version
v0.8.14
(env)┌(roger@quorra)-(01:20am)-(⭠master)
└(%:~/gits/turbulenz_engine) node external/tzbuild/../typescript/0.8.3/tsc.js --version
try:
from urllib.parse import quote
except ImportError:
# Python 2
from urllib import quote
import requests
# Session
ssomobile = "https://ssomobile.personal.com.ar/loginMobile/"

Keybase proof

I hereby claim:

  • I am roger on github.
  • I am rogerduran (https://keybase.io/rogerduran) on keybase.
  • I have a public key whose fingerprint is FFE0 7873 516C 05DC FB05 E0EA B44B 10E9 4EDD 0B10

To claim this, I am signing this object:

// ==UserScript==
// @name skype redirector
// @description redirect broken skype pish urls
// @namespace r0x0r
// @include https://api.asm.skype.com/s/i*
// @version 1
// @grant none
// ==/UserScript==
@Roger
Roger / sthemer.py
Created November 10, 2016 17:07
Download themes from https://terminal.sexy and convert them to st
# to use the themes, remove your colors from config.h and #include themes/themename.h
import os
import re
import json
import unicodedata
import urllib.request
USER_AGENT = 'SThemer/0.1.0'
HEADERS = {
@Roger
Roger / shellexpand-combine.rs
Created January 18, 2020 15:52
shellexpand-combine.rs PoC
use std::borrow::Cow;
use std::env;
use combine::error::ParseError;
use combine::parser::char::{alpha_num, char, letter, string};
use combine::parser::combinator::recognize;
use combine::stream::Stream;
use combine::{choice, easy, many1, optional, parser, satisfy, skip_many, EasyParser, Parser};
#[derive(Debug, PartialEq)]
mod states {
pub struct Red;
pub struct Yellow;
pub struct Green;
}
fn red(_traffic_light: &TrafficLight<states::Red>) {}
fn yellow(_traffic_light: &TrafficLight<states::Yellow>) {}
{
"0": "Weeds/0/-1/Basic/Weeds/A bunch of obnoxious weeds.",
"2": "Stone/0/-300/Basic/Stone/A useful material when broken with the Pickaxe.",
"4": "Stone/0/-300/Basic/Stone/A useful material when chopped with the axe.",
"16": "Wild Horseradish/50/5/Basic -81/Wild Horseradish/A spicy root found in the spring.",
"18": "Daffodil/30/0/Basic -81/Daffodil/A traditional spring flower that makes a nice gift.",
"20": "Leek/60/16/Basic -81/Leek/A tasty relative of the onion.",
"22": "Dandelion/40/10/Basic -81/Dandelion/Not the prettiest flower, but the leaves make a good salad.",
"24": "Parsnip/35/10/Basic -75/Parsnip/A spring tuber closely related to the carrot. It has an earthy taste and is full of nutrients.",
"30": "Lumber/2/10/Basic/Lumber/A versatile resource used for building and fuel.",