Set up project:
mkdir project
cd project
npm init -y
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
function getIncrement($str) { | |
$len = strlen($str); | |
if($str === '') { | |
return '0'; | |
} | |
for($i = $len - 1; $i >= 0; $i--) { | |
if($str[$i] === '9') { | |
$str[$i] = 'A'; | |
break; | |
} |
LinkedList<String> list = new LinkedList<>(); |
// StrShuffle shuffles a string that is passed to it | |
func StrShuffle(str string) string { | |
n := 25 + rand.Intn(25) | |
var runes []rune | |
for _, runeval := range str { | |
runes = append(runes, runeval) | |
} | |
var shuffle = func() bool { | |
if rand.Intn(2) == 1 { | |
return true |
listen *:443 ssl http2; | |
listen [::]:443 ssl http2; | |
ssl_certificate /etc/letsencrypt/live/[site_name]/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/[site_name]/privkey.pem; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_prefer_server_ciphers on; | |
ssl_ciphers 'ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:!ADH:!AECDH:!MD5'; |
class PopularActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
listView { | |
id = ViewID.ID_POPULAR_LIST | |
// This task will happen asynchronously in a separate thread (so you can perform network operations) |
db?.createTable("tablename", true, | |
"id" to INTEGER + PRIMARY_KEY, | |
"name" to TEXT, | |
"base" to TEXT, | |
"lastRead" to object : SqlType { | |
override val modifier: String? | |
get() = null | |
override val name: String | |
get() = "DATETIME" | |
} |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
keepalive_timeout 180; | |
client_max_body_size 0; | |
sendfile on; | |
tcp_nodelay on; | |
gzip off; | |
upstream droppy { |