Skip to content

Instantly share code, notes, and snippets.

View copyleftdev's full-sized avatar

L337[e8f223b2]SIGMA copyleftdev

View GitHub Profile
@copyleftdev
copyleftdev / seedv2.py
Last active March 9, 2016 20:08
seedv2
#!/usr/bin/env/python
import os
import random
import shutil
from faker import Factory
fake = Factory.create()
"""
PII Seeding Utility
@copyleftdev
copyleftdev / folder_splitter.py
Created March 5, 2016 23:51 — forked from zupo/folder_splitter.py
Split a folder with many files into subfolders with N files. Usage: python folder_splitter.py path/to/target/folder
# -*- coding: utf-8 -*-
# @author: Peter Lamut
import argparse
import os
import shutil
N = 10 # the number of files in seach subfolder folder
@copyleftdev
copyleftdev / bloom.sh
Created February 28, 2016 16:34
create subfolder for massive file set
i=1;while read l;do mkdir $i;mv $l $((i++));done< <(ls|xargs -n100)
#!/usr/bin/env python
import random
import os
from faker import Factory
import datetime
fake = Factory.create()
def getDocList(rootFoldr):
#!/usr/bin/env python
# This tool will radom select articles from a wikipedia article select
# and radomly seed it with PII data
import random
import os
from faker import Factory
@copyleftdev
copyleftdev / rec_b2z.py
Last active February 19, 2016 20:39
recursivly decompress bz2 file
for filename in files:
filepath = os.path.join(dirpath, filename)
newfilepath = os.path.join(dirpath, filename + '.decompressed')
with open(newfilepath, 'wb') as new_file, bz2.BZ2File(filepath, 'rb') as file:
for data in iter(lambda : file.read(100 * 1024), b''):
new_file.write(data)
@copyleftdev
copyleftdev / Json.cs
Created November 24, 2015 20:39
C# des json
public void LoadJson()
{
using (StreamReader r = new StreamReader("file.json"))
{
string json = r.ReadToEnd();
List<Item> items = JsonConvert.DeserializeObject<List<Item>>(json);
}
}
public class Item
@copyleftdev
copyleftdev / TaskStatus.cs
Created November 14, 2015 17:02
TaskParser
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
namespace TaskManagerParser
{
public class TaskStatus
{
[XmlArrayItem("Id")]
public List<string> TaskIds { get; set; }
# Ansible playbook to install Java 7 on Debian
#
# Thanks to http://www.sysadminslife.com/linux/howto-oracle-sun-java-7-installation-unter-debian-6-squeeze/
#
# Author: Gabriel Birke <gb@birke-software.de>
- hosts: devroot
vars:
java_download: http://download.oracle.com/otn-pub/java/jdk/7u45-b18/jdk-7u45-linux-x64.tar.gz
java_name: jdk1.7.0_45

Transparent Git Encryption

This document has been modified from its [original format][m1], which was written by Ning Shang (geek@cerias.net). It has been updated and reformatted into a [Markdown][m2] document by [Woody Gilk][m3] and [republished][m4].

Description

When working with a remote git repository which is hosted on a third-party storage server, data confidentiality sometimes becomes