Skip to content

Instantly share code, notes, and snippets.

@olekukonko
olekukonko / reclaimWindows10.ps1
Created January 18, 2017 17:51 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
@olekukonko
olekukonko / golang-tls.md
Created January 1, 2017 22:21 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
openssl ecparam -genkey -name secp384r1 -out server.key
@olekukonko
olekukonko / golang_job_queue.md
Created March 26, 2016 12:13 — forked from harlow/golang_job_queue.md
Job queues in Golang
@olekukonko
olekukonko / preprocessor_fun.h
Last active August 30, 2015 20:46 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@olekukonko
olekukonko / Tags.go
Last active August 29, 2015 14:26 — forked from mattcunningham/Tags.go
package main
import (
"fmt"
"reflect"
"net/url"
)
type ExampleType struct {
Name string `url:"name"`
func handleUpload(u io.Reader) (err error) {
// capture all bytes from upload
b, err := ioutil.ReadAll(u)
if err != nil {
return
}
// wrap the bytes in a ReadSeeker
r := bytes.NewReader(b)
// To the extent possible under law, the Yawning Angel has waived all copyright
// and related or neighboring rights to orhttp_example, using the creative
// commons "cc0" public domain dedication. See LICENSE or
// <http://creativecommons.org/publicdomain/zero/1.0/> for full details.
package main
import (
// Things needed by the actual interface.
"golang.org/x/net/proxy"
@olekukonko
olekukonko / script.sh
Last active August 29, 2015 14:19 — forked from adnaan/script.sh
ls -la
echo "hello"
tree
adb devices
adb wait-for-device #example of a long running task
// call this function from a http Handler Func, where data is the response object
// response will be compressed with gzip if requester accepts it
// browser should automatically decompress into valid json
func jsonResponseWriter(w http.ResponseWriter, r *http.Request, data interface{}) error {
var err error
var jsonData []byte
if jsonData, err = json.Marshal(data); err != nil {
return err
}
w.Header().Set("Content-Type", "application/json")