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 / 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 / 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
@lkraider
lkraider / generator.py
Created April 4, 2016 17:17
Terraform AWS policy generator
#!/usr/bin/env python
"""Convert CSV policies into AWS JSON format."""
import json
import csv
POLICIES = 'terraform.csv'
CRUD_COL = 2
ACTION_COL = 3
@lkraider
lkraider / mac-osx-el-captain-commands.sh
Last active April 24, 2016 11:00 — forked from rahul286/mac-osx-el-captain-commands.sh
Updating to Mac El Capitan using downloaded pkg file
#!/bin/sh
set -ex
## El Capitan Download
## based on https://github.com/lioonline/OS-X-El-Capitan
## and https://7labs.heypub.com/tips-tricks/el-capitan-direct-download.html
## pkg file link - version 10.11.4
HOST="http://osxapps.itunes.apple.com"
PATH="/apple-assets-us-std-000001/Purple69/v4/6a/c9/bc/6ac9bcc0-71a4-9b73-bb59-c1b053df10b9/"
{
"timestamp": 1461277820031,
"webhookEvent": "jira:issue_updated",
"user": {
"self": "http://jira.server.my/rest/api/2/user?username=paul",
"name": "paul",
"key": "paul",
"emailAddress": "paul@server.my",
"avatarUrls": {
"48x48": "http://www.gravatar.com/avatar/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?d=mm&s=48",
from schemalchemy import Base
from schematics.types import StringType
from schematics.types.compound import ListType, ModelType
from schematics.types.serializable import serializable
from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, relationship, synonym
@lkraider
lkraider / calc.glade
Created June 26, 2016 22:27
PYculator GTK 2.0 (2007)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--Generated with glade3 3.3.4 on Mon Sep 10 16:47:51 2007 -->
<glade-interface>
<widget class="GtkWindow" id="calc">
<property name="width_request">275</property>
<property name="height_request">250</property>
<child>
<widget class="GtkVBox" id="vbox1">
<property name="visible">True</property>
@lkraider
lkraider / dockerrun-jsen-schema.json
Last active August 17, 2021 16:54 — forked from sordina/dockerrun-jsen-schema.json
jsen schema to validate Dockerrun.aws.json files
{
"type": "object",
"required": [
"AWSEBDockerrunVersion",
"containerDefinitions",
"volumes"
],
"properties": {
"AWSEBDockerrunVersion": {
"type": "integer",
@lkraider
lkraider / objects.TRAPPIST-1.xml
Created February 28, 2017 21:25
TRAPPIST-1 Universe Sandbox
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<System xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--
Sources:
http://www.trappist.one/#system
http://www.trappist.one/system/
https://exoplanets.nasa.gov/trappist1/
https://en.wikipedia.org/wiki/TRAPPIST-1
http://exoplanet.eu/catalog/trappist-1_b/
http://www.exoplanetkyoto.org/exohtml/TRAPPIST-1.html