--headless --temp-profile --print-to-pdf="/tmp/google.pdf" https://www.google.com
docker run -ti --privileged=true --rm -v /tmp/prints:/tmp/prints alpine:edge /bin/sh
package main | |
import ( | |
"github.com/pkg/errors" | |
"github.com/gorilla/mux" | |
"time" | |
"net/http" | |
"net" | |
"log" | |
"fmt" |
for a in $(git branch -a | grep remotes | awk '{print $1}' | sed 's/remotes\/origin\///'); do echo -n ${a} -\ ; git clean -d -x -f > /dev/null 2>&1 ;git checkout ${a} > /dev/null 2>&1; du -hs -I .git .;done |
package main | |
import ( | |
"github.com/tehmoon/errors" | |
"fmt" | |
) | |
// This example is similar to "github.com/pkg/errors" from Dave Cheney | |
// The idea is to declare simple error and have them chained using WrapErr | |
// so it's easy to have the complete chain of errors if needed. |
package main | |
import ( | |
"net/url" | |
"fmt" | |
"github.com/tehmoon/errors" | |
"github.com/aws/aws-sdk-go/aws/session" | |
"github.com/aws/aws-sdk-go/service/s3/s3manager" | |
"github.com/aws/aws-sdk-go/service/s3" | |
"io" |
syn on | |
se nu | |
se clipboard=unnamed | |
se iskeyword==,_,/,\",],[,:,\',.,\,,\(,\),{,} | |
se nofixendofline | |
se ts=2 | |
se noexpandtab | |
set cindent | |
set sw=2 |
package main | |
// From https://play.golang.org/p/dXBizm4xl3 | |
import ( | |
"io" | |
"fmt" | |
"net" | |
"net/http" | |
"os" |
Check if the process is vulnerable to DNS rebinding attack. | |
First run the server after changing the code: | |
$> go server.go | |
Find the ip address of one of you iface and then add this line to /etc/hosts: | |
x.x.x.x blihblah | |
package main | |
import ( | |
"encoding/json" | |
"os" | |
"text/template" | |
) | |
var data = map[string]interface{}{ | |
"blih": true, |
export WORDCHARS='*?_[]~=&;!#$%^(){}' | |
setopt HIST_IGNORE_SPACE |