Skip to content

Instantly share code, notes, and snippets.

View simonsickle-old's full-sized avatar

Simon Sickle simonsickle-old

View GitHub Profile
@simonsickle-old
simonsickle-old / SickleClone.go
Last active June 10, 2016 03:23
This clones every single repository of a user's github (public) to the current directory in a mirrored form. Handy for gerrit instances
package main
import (
"fmt"
"os"
"os/exec"
"github.com/google/go-github/github"
"golang.org/x/oauth2"
)
@simonsickle-old
simonsickle-old / k2_cl.xml
Created November 27, 2013 16:18
Local Manifest for One SV (Boost)
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/htc/k2_cl" name="SimonSickle/android_device_htc_k2_cl" />
<project path="vendor/htc/k2_cl" name="SimonSickle/android_vendor_htc_k2_cl" />
<project path="kernel/htc/k2_cl" name="SimonSickle/cm_kernel_htc_k2_cl" />
<project path="device/htc/msm8960-common" name="CyanogenMod/android_device_htc_msm8960-common" />
</manifest>
#/bin/bash
mkfs.ext4 /dev/sda2
mkfs.btrfs -f /dev/sda3
mkfs.btrfs -f /dev/sda4
mkfs.btrfs -f /dev/sda5
mkfs.btrfs -f -d single /dev/sda6 /dev/sdb1 /dev/sdc1
mount /dev/sda3 /mnt/gentoo
mkdir /mnt/gentoo/{home,usr,var,boot}
mount /dev/sda2 /mnt/gentoo/boot
mount /dev/sda4 /mnt/gentoo/var
@simonsickle-old
simonsickle-old / check.php
Created April 26, 2014 22:13
File Existence
<?php
$file = $_GET['f'];
$base_directory = "/home/foo/site_files/";
$final_check = $base_directory.$file;
if (file_exists($final_check)) {
echo "1";
} else {
echo "0";
}
@simonsickle-old
simonsickle-old / api.php
Last active August 29, 2015 14:00
Carbon Roms PHP api
<?php
$_config = require_once("config.php");
$baseDir = $_config['base_file_dir'];
$hiddenFiles = $_config['hidden_files'];
$dir = $_GET['dir'];
$sort = $_GET['sort'];
$pretty = $_GET['pretty'];
@simonsickle-old
simonsickle-old / makethem.sh
Created June 24, 2014 16:18
MD5 Generator
#!/bin/bash
# Below place your directory you want to search. For example below shows allfolders/allfiles.zip
list=*/*.zip
# Place file extension of a seperate file that you require to occompany your other files
extraextension=.md5
for i in $( ls $list ); do
if [ ! -f $i.$extraextension ]; then
md5sum $i > $i.$extraextension
<DOCTYPE html>
<header>
<title>Carbon Changelog</title>
</header>
<body>
<?php
// Get JSON Data
$jsonraw = file_get_contents("https://review.carbonrom.org/changes/?q=status:merged");
$json = json_decode(preg_replace('/^.+\n/', '', $jsonraw));
<?php
// A script to list devices and their "friendly" names
$devices = array(
"deb" => "Google Nexus 7 2013 (4G)",
"flo" => "Google Nexus 7 2013 (Wi-Fi)",
"grouper" => "Google Nexus 7 (Wi-Fi)",
"endeavoru" => "HTC One X",
"m7" => "HTC One (GSM)",
"m7spr" => "HTC One (Sprint)",
"m7vzw" => "HTC One (Verizon)",
@simonsickle-old
simonsickle-old / mirrorit.sh
Last active August 29, 2015 14:09
Android Mirroring
#!/bin/bash
######################################################
# Copyright 2014 (c) Simon Sickle #
# MIT LICENSE #
######################################################
# Notes: Run this script from the directory containing
# the android source. Modify variables at the top to
# customize the upload. Meant for AOSP. Enjoy!
@simonsickle-old
simonsickle-old / birthday-checker.c
Created January 12, 2015 03:18
birthday-checker.c
/* Copyright 2015 Simon Sickle <simon@simonsickle.com>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.