Skip to content

Instantly share code, notes, and snippets.

@Soulou
Soulou / hijackhttps.go
Created July 21, 2013 10:45
I was looking to do HTTPS socket hijacking, here is the way to do ! The link between client and server are completely encrpted. Keywords : HTTPS TCP Socket Hijacking Golang
package main
import (
"crypto/tls"
"fmt"
"net"
"net/http"
"net/http/httputil"
"time"
)
// # docker inspect 780cb5846872
[{
"ID": "780cb58468724809b994dcd862c62fa7a329424072ef9082a4e5a4bbdf6836d7",
"Created": "2013-11-09T00:58:43.833851609+01:00",
"Path": "/start",
"Args": [
"web",
"bundle",
"exec",
@Soulou
Soulou / Client output
Created December 27, 2014 13:07
go-graceful-restart - netstat
└> go run pong.go
[Client] Received 4 bytes, 'ping'
[Client] Sent 'ping'
[Client] Received 4 bytes, 'ping'
[Client] Sent 'ping'
...
└> go run ./pong.go
[Client] Received 4 bytes, 'ping'
[Client] Sent 'ping'
[Client] Received 4 bytes, 'ping'
@Soulou
Soulou / gen_repositories_btrfs.go
Created December 21, 2015 10:05
Restore repositories-btrfs of a full BTRFS parition of Docker
package main
// docker images --no-trunc | awk '{print $1 " " $2 " " $3}' > images_data
// go run gen_repositories_btrfs.go images_data
import (
"bufio"
"bytes"
"encoding/json"
"fmt"
@Soulou
Soulou / Gemfile
Created February 11, 2016 15:59
Get signed URL with shared fs S3
source 'https://rubygems.org'
gem 'aws-s3'
package main
import (
"fmt"
"syscall"
"unsafe"
)
const cursorColumn = false
@Soulou
Soulou / child-app-gitlab.rb
Last active July 26, 2019 01:04
Deploy a child app on Scalingo from a Gitlab private repository
#!/usr/bin/env ruby
require 'json'
require 'restclient'
auth_token = ENV["AUTH_TOKEN"]
api_url = ENV["SCALINGO_API_URL"] || "https://api.scalingo.com/v1"
auth_url = ENV["SCALINGO_AUTH_URL"] || "https://auth.scalingo.com/v1"
app = ENV["APP"]
@Soulou
Soulou / file1.txt
Last active December 8, 2017 17:07
Test Gist URL
This is a test v3