Skip to content

Instantly share code, notes, and snippets.

io = process(['./adoptioncenter'],
aslr=False,
stdin=PTY, raw=False,
env={'LD_PRELOAD': './libc-2.23.so'})
fd = io.stdin.fileno()
old_settings = termios.tcgetattr(fd)
# ...
@kyrre
kyrre / boxstarter.ps1
Created February 6, 2019 13:43 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@kyrre
kyrre / MLproject
Created August 23, 2018 13:25
mlflow woes
name: dga
conda_env: model.yaml
entry_points:
main:
parameters:
experiment-id: int
command: "python main.py --experiment-id={experiment-id}"
@kyrre
kyrre / ocr.py
Last active August 29, 2015 14:17
ocr
import pytesseract
import tempfile
import os
import glob
import wand.image
import shutil
import msgpack
import io
@kyrre
kyrre / eks.json
Last active August 29, 2015 14:17
unpack
{
'Origin': '\nUnited States. Joint Chiefs of Staff. Joint Middle East Planning Committee\n',
'Full Text': 'Document image',
'From': 'Wentworth, R.D. |\nHillyard, Harry L.',
'Individuals/Organizations Named': 'United States. Joint Chiefs of Staff. Joint Middle East Planning\nCommittee',
'Subjects': 'Tribal groups | Intelligence assessments | Economic assistance | United States. Joint Chiefs of\nStaff | Political power | Afghanistan. Armed Forces | Roads | Pipelines | Aircraft | Military\ntraining | Pashtunistan | Zahir Shah family | Military personnel | Soviet influence | Pakistan | Pashtunistan dispute | Kabul | Warfare',
'Abstract': 'Tribal groups resist the Political\npower of the Zahir Shah family and cannot be relied upon if the Pashtunistan\ndispute leads to Warfare ; Intelligence assessments estimate that Afghanistan.\nArmed Forces consist of 64 thousand Military personnel concentrated around\nKabul ; Economic assistance from the Soviets for Afghan [Roads; Pipelines;\nAircraft;
@kyrre
kyrre / convert.py
Created March 19, 2015 17:22
convert pdf files to text
def pdf_to_str(filename, resolution=600):
try:
with wand.image.Image(filename=filename, resolution=resolution) as img:
img.type = 'grayscale'
img.format = 'jpeg'
img.compression_quality = 100
directory = tempfile.mkdtemp()
output_path = os.path.join(directory, filename[:-4] + '.jpg')

Building Guru App with EmberCLI

Example app found at http://goo.gl/K0Lf61

This app requires EmberCLI to be installed. You can install it via npm using npm install -g ember-cli

$ ember new guru-app
$ cd guru-app
@kyrre
kyrre / yo.c
Created December 12, 2014 07:13
/*
NYU Polytechnic Institute
CS6573: Penetration Testing and Vulnerability Analysis
Code Auditing Homework Assignment
There are a number of security holes in this network service,
but your assignment is to only find 3.
They could be both architectural or implementation problems.
Look for bad logic and memory mismanagement.
*/
@kyrre
kyrre / 34995916.json
Created November 6, 2014 13:00
The following should be the programs output for the URL http://us.levi.com/product/index.jsp?productId=34995916
{
"category": "pants",
"gender": "men",
"description": "Ride, live, and work in the same pair of pants. Designed for the urban cyclist, our Commuter 511 Slim Fit Trousers provide greater convenience, safety, mobility, and protection no matter how you roll. View our new Commuter collection.",
"url": "http://us.levi.com/product/index.jsp?productId=34995916",
"name": "LEVI'S COMMUTER 511 SLIM FIT TROUSERS",
"color_options": {
"Performance Timberwolf": {
"images": ["http://levi.imageg.net/graphics/product_images/pLEVI1-17492943t330x400.jpg", "http://LEVI.imageg.net/graphics/product_images/pLEVI1-17492943_alternate1_t500x607.jpg"],
"preview_image": "http://LEVI.imageg.net/graphics/product_images/pLEVI1-17492943_pattern_s27x21.jpg",
(ns app.address.routes
(:require [app.web-util :refer [extract]]
[app.address.model :as model]
[app.ember :as ember]
[schema.core :as s]
[taoensso.timbre :as timbre]
[compojure.core :refer [defroutes ANY POST PUT DELETE GET]]))
(s/defschema BaseAddressSchema
"Minimum Address schema."