Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Welcome to my website!")
GYP_DEFINES="-DOS=linux" CC=x86_64-linux-musl-gcc CXX=x86_64-linux-musl-c++ node-gyp rebuild --target_platform=linux --target_arch=x64
sysdig -s2000 -A -c echo_fds fd.sport=8500
sysdig proc.name=consul and fd.type=ipv4 | grep EPIPE
2632 20:01:09.654932881 1 consul (17985) < write res=-32(EPIPE) data=HTTP/1.1 400 Bad Request..Content-Type: text/plain..Connection: close....400 Bad
3099 20:01:09.656000005 3 consul (17985) < write res=-32(EPIPE) data=HTTP/1.1 400 Bad Request..Content-Type: text/plain..Connection: close....400 Bad
3485 20:01:09.657507645 3 consul (17985) < write res=-32(EPIPE) data=HTTP/1.1 400 Bad Request..Content-Type: text/plain..Connection: close....400 Bad
3847 20:01:09.658398406 3 consul (17985) < write res=-32(EPIPE) data=HTTP/1.1 400 Bad Request..Content-Type: text/plain..Connection: close....400 Bad
find /home/feydr/work/bluffweb/app/models/ -type f | xargs perl -pi -e 's/validates_present/validates_presence_of/g'
1) should be able to respond to urls like /admin/freemoney/I.S.D.A
despite this being a 'bad username' it is a requirement
2) should know the difference between I.S.D.A (a username) and I.S.D.A.text (username w/content-type request)
options:
1) add custom-routes for every url we need eg:
match("/admin/freemoney/(:id)", :id => /(.*)/).to(:controller => "admin", :action => "freemoney")
@eyberg
eyberg / gist:107557
Created May 6, 2009 15:33
unicode boms
# test.txt
#
# ����sample text
# ��more text...
# ��sample more text...
# ��
# read in our multi-byte file
File.open('test.txt', 'r') do |f|
# test.txt
#
# ����sample text
# ��more text...
# ��sample more text...
# ��
# read in our multi-byte file
File.open('test.txt', 'r') do |f|
erl -name '[email protected]' -setcookie abcd
erl -name '[email protected]' -setcookie abcd
([email protected])1> net_adm:ping('[email protected]').
pang