Skip to content

Instantly share code, notes, and snippets.

erl -name 'one@mine.loc' -setcookie abcd
erl -name 'two@mine.loc' -setcookie abcd
(one@mine.loc)1> net_adm:ping('two@mine.loc').
pang
# test.txt
#
# ����sample text
# ��more text...
# ��sample more text...
# ��
# read in our multi-byte file
File.open('test.txt', 'r') do |f|
@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|
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")
find /home/feydr/work/bluffweb/app/models/ -type f | xargs perl -pi -e 's/validates_present/validates_presence_of/g'
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
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
package main
import (
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Welcome to my website!")
➜ r ops pkg load R_3.4.4 -c config.json -a hi.r
booting /Users/eyberg/.ops/images/R ...
en1: assigned 10.0.2.15
[1] "Hello World!"
Warning message:
system call failed: Function not implemented
exit status 1
➜ r cat config.json
{
eyberg@s1:~/r$ cat config.json
{
"files":["hi.r"],
"Args":["hi.r", "--args", "hello","you"]
}
eyberg@s1:~/r$ ops pkg load R_3.4.4 -c config.json
booting /home/eyberg/.ops/images/R ...
en1: assigned 10.0.2.15
[1] "hello you"