This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if (!isset($_GET['ILoveMauticReallyIDo'])) { | |
| echo 'The secret phrase is wrong.'; | |
| die; | |
| } | |
| $link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; | |
| $allowedTasks = array( | |
| 'cache:clear', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // A small SSH daemon providing bash sessions | |
| // | |
| // Server: | |
| // cd my/new/dir/ | |
| // #generate server keypair | |
| // ssh-keygen -t rsa | |
| // go get -v . | |
| // go run sshd.go | |
| // | |
| // Client: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Whatever struct { | |
| someField int | |
| } | |
| func (w Whatever) MarshalJSON() ([]byte, error) { | |
| return json.Marshal(struct{ | |
| SomeField int `json:"some_field"` | |
| }{ | |
| SomeField: w.someField, | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "net/url" | |
| "reflect" | |
| "strconv" | |
| ) | |
| type Person struct { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| SN="tmuxwork" | |
| tmux has-session -t $SN &>/dev/null | |
| if [ $? != 0 ] | |
| then | |
| tmux new -s $SN -n conf -d | |
| tmux new-window -t $SN:2 -n misc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // You can test this online at: https://play.golang.org/p/hhayRT1VWgj | |
| package main | |
| import ( | |
| "crypto/sha1" | |
| "encoding/hex" | |
| "fmt" | |
| "io" | |
| "strings" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " needs https://code.google.com/p/rog-go/source/browse/exp/cmd/godef/godef.go | |
| if !exists("g:godef_command") | |
| let g:godef_command = "godef" | |
| endif | |
| function! GodefUnderCursor() | |
| let offs=line2byte(line('.'))+col('.')-1 | |
| call Godef("-o=" . offs) | |
| endfunction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #a/usr/bin/perl | |
| # This script was hastily cobbled together for my own use. It can | |
| # probably break your system. Use at your own risk. | |
| $JAIL = "/srv/http"; | |
| $USER = "http"; | |
| $GROUP = "http"; | |
| $WWW_DIR = "www"; | |
| sub run{ |
NewerOlder