Skip to content

Instantly share code, notes, and snippets.

View laurentiuilie's full-sized avatar

Laurentiu Ilie laurentiuilie

  • Haarlem, The Netherlands
View GitHub Profile
@laurentiuilie
laurentiuilie / https_mitm_proxy.go
Created March 4, 2020 15:23 — forked from mpfund/https_mitm_proxy.go
Golang Http(s) mitm Proxy
package main
import (
"bytes"
"compress/gzip"
"crypto/tls"
"crypto/x509"
"encoding/pem"
"io/ioutil"
"log"

Bash command line Shortcuts

Picked these from here

Command Editing Shortcuts

Command Note
Ctrl + a go to the start of the command line
Ctrl + e go to the end of the command line
Ctrl + k delete from cursor to the end of the command line
QUESTION:
I have a simple MySQL table thats contains a list of categories, level is determined by parent_id:
id name parent_id
---------------------------
1 Home 0
2 About 1
3 Contact 1
4 Legal 2
5 Privacy 4
@laurentiuilie
laurentiuilie / auth.go
Created November 28, 2016 22:40 — forked from tristanwietsma/auth.go
Golang web server example
package main
import (
"encoding/base64"
"net/http"
"strings"
)
type handler func(w http.ResponseWriter, r *http.Request)
@laurentiuilie
laurentiuilie / curl.md
Created November 28, 2016 22:37 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@laurentiuilie
laurentiuilie / README.md
Created November 28, 2016 22:34 — forked from joyrexus/README.md
go api dev, part 2
<?php
class BlogController extends Controller
{
/**
* Posts
*
* @return void
*/
public function showPosts()
body {
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
}
.tree-view-resizer, .editor {
::-webkit-scrollbar {
width: 0.5em;
height: 0.5em;

Sublime Text 2 – Useful Shortcuts (Windows)

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command prompt
Ctrl+` python console
Ctrl+N new file

Editing