Skip to content

Instantly share code, notes, and snippets.

View lkraider's full-sized avatar

Paul Eipper lkraider

View GitHub Profile
@lkraider
lkraider / sol.py
Last active August 28, 2015 16:36 — forked from CleitonDeLima/sol.py
import fileinput
MAX = 0
P = 10000
def identidade(matriz):
for i in range(MAX):
for j in range(MAX):
matriz[i][j] = int((i == j))
@lkraider
lkraider / gist:59254
Created February 6, 2009 06:27
Ubiquity I'm Feeling Lucky google search
/* Based on Royall's original quicky script:
* http://gist.github.com/16507
*/
CmdUtils.CreateCommand({
name: "quicky",
icon: "http://www.google.com/favicon.ico",
homepage: "http://lkraider.eipper.com.br/ubiquity",
author: { name: "Paul Eipper", email: "paul@eipper.com.br"},
license: "GPL",
description: "Perform an I'm Feeling Lucky google search on the preview pane",
@lkraider
lkraider / github_cloudfront_disable_ssl.user.js
Created March 20, 2011 06:03
Greasemonkey userscript that removes SSL from Cloudfront hosted assets in GitHub
/*
# README
This userscript is a hack to replace HTTPS Cloudfront hosted assets on GitHub.
Cloudfront serves its files *only* through 128-bit RC4/MD5 encryption, which is
old and not appropriate for secure use in the modern day, and as such I have
that disabled in Firefox (about:config security.ssl3.rsa_rc4_128_md5).
Since there is currently no way to whitelist encryption schemes for specific
+---------------------------+
| o +---+ |
|+-------------------------+|
||.:!3G 13:37 [###]||
||-------------------------||
|| +---+ +---+ +---+ +---+ ||
|| |,O | | 1 | | v | | O | ||
|| +---+ +---+ +---+ +---+ ||
|| Msg Cal Pic Cam ||
@lkraider
lkraider / gist:1115252
Created July 30, 2011 06:02
MWPhotoBrowser
--- a/MWPhotoBrowser.m
+++ b/MWPhotoBrowser.m
@@ -95,7 +95,6 @@
pagingScrollView.backgroundColor = [UIColor blackColor];
pagingScrollView.contentSize = [self contentSizeForPagingScrollView];
pagingScrollView.contentOffset = [self contentOffsetForPageAtIndex:currentPageIndex];
- [self.view addSubview:pagingScrollView];
// Setup pages
visiblePages = [[NSMutableSet alloc] init];
@lkraider
lkraider / report-0ed362.html
Created December 3, 2015 22:47
Atlas-iOS ATLMediaInputStream.m leaks
<!doctype html>
<html>
<head>
<title>Atlas-iOS/Code/Utilities/ATLMediaInputStream.m</title>
<style type="text/css">
body { color:#000000; background-color:#ffffff }
body { font-family:Helvetica, sans-serif; font-size:10pt }
h1 { font-size:14pt }
.code { border-collapse:collapse; width:100%; }
.code { font-family: "Monospace", monospace; font-size:10pt }
@lkraider
lkraider / BasicExample.md
Last active December 14, 2015 13:28 — forked from zdne/BasicExample.md

Format: 1A Host: http://blog.acme.com

Basic ACME Blog API

Welcome to the ACME Blog API. This API provides access to the ACME Blog service.


import unittest
import hashlib
from schematics.models import Model
from schematics.types import IntType, StringType, MD5Type
from schematics.exceptions import ValidationError
class TestTransformers(unittest.TestCase):
@lkraider
lkraider / custom_schematics_type.py
Last active December 18, 2015 22:38 — forked from JensRantil/custom_schematics_type.py
Demonstrating the convert -> validate -> primitive structure
#!/bin/env python2.7
from schematics.models import Model
from schematics.types import StringType
from schematics.exceptions import ValidationError
class EventType(StringType):
DIVIDER = ':'
@lkraider
lkraider / decorator-class-example.py
Created March 9, 2016 01:50
Python decorator class example
from datetime import datetime
import functools
class convert_argument(object):
def __init__(self, data_type):
print '__init__(data_type="%s")' % data_type
self.prefix_converter = 'convert_'
self.data_type = data_type