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
opt <- options(warn=-1) | |
## ------------------------------------------------------------ | |
## Test | |
## ------------------------------------------------------------ | |
## > rm(list=ls()); source("Eval.R") | |
## > repl() | |
## rlisp > (<- make.counter (function (c) (function () (<<- c (+ c 1))))) |
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
import play.db.anorm._ | |
import play.db.anorm.defaults._ | |
trait Identifiable[A] { | |
type ID = A | |
val id: Pk[ID] | |
} | |
trait ExMagic[A <: Identifiable[_]] extends Magic[A] { | |
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
def new_user(admin_username, admin_password): | |
env.user = 'root' | |
# Create the admin group and add it to the sudoers file | |
admin_group = 'admin' | |
runcmd('addgroup {group}'.format(group=admin_group)) | |
runcmd('echo "%{group} ALL=(ALL) ALL" >> /etc/sudoers'.format( | |
group=admin_group)) | |
# Create the new admin user (default group=username); add to admin group |
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
// $ 6g echo.go && 6l -o echo echo.6 | |
// $ ./echo | |
// | |
// ~ in another terminal ~ | |
// | |
// $ nc localhost 3540 | |
package main | |
import ( |
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
var global = this; | |
global.__defineGetter__("self", function _() { | |
return _.caller || global; | |
}); | |
function foo() { | |
alert(self); | |
} |
NewerOlder