Skip to content

Instantly share code, notes, and snippets.

{
"window.zoomLevel": 0,
"editor.fontFamily": "monospace",
"terminal.integrated.fontFamily": "monospace",
// "terminal.integrated.cwd": "/home/numpass/Documents/ftpserver/workspace",
"workbench.editor.showTabs": false,
"workbench.activityBar.visible": false,
"editor.lineNumbers": "off",
"git.enableSmartCommit": true,
"terminal.integrated.rendererType": "dom",
@vbuterin2
vbuterin2 / haproxy.cfg
Created May 24, 2020 08:26 — forked from SilverBut/haproxy.cfg
[Haproxy cfg checking Socks5] Haproxy cfg to check the Socks5 connection #tags: GFW, network, haproxy, config
#---------------------------------------------------------------------
# Example configuration for a possible web application. See the
# full configuration options online.
#
# http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
#
#---------------------------------------------------------------------
global
log 127.0.0.1 local2
@vbuterin2
vbuterin2 / ovpn optimize parameters
Created June 24, 2020 03:01
ovpn optimize parameters
socks-proxy 127.0.0.1 1069
socks-proxy-retry
sndbuf 0
rcvbuf 0
connect-retry 0 1000
socket-flags TCP_NODELAY
inactive 120
ping 10
ping-exit 60
fun main(): Unit {
for (i in 11..10 step 2) {
print("Counter $i")
}
var i = 11
while(i<=10)
{
fun main(): Unit {
/*
Counter 10Counter 12Counter 14Counter 16Counter 18Counter 20Counter 22Counter 24
Counter 26Counter 28Counter 30Counter 32Counter 34Counter 36Counter 38Counter 40
Counter 42Counter 44Counter 46Counter 48Counter 50Counter 52Counter 54Counter 56
Counter 58Counter 60Counter 62Counter 64Counter 66Counter 68Counter 70Counter 72
Counter 74Counter 76Counter 78Counter 80Counter 82Counter 84Counter 86Counter 88
Counter 90Counter 92Counter 94Counter 96Counter 98Counter 100
Do while loop
*/
class Outer {
// nullable type chosen by the programmer
private val name:String? = "forestfh"
inner class Nested {
fun Show() = println(name)
}
}
fun main(args: Array<String>) {
class Outer {
// nullable type chosen by the programmer
private val name:String? = "forestfh"
inner class Nested {
fun Show() = println(name)
}
}
fun main(args: Array<String>) {
abstract class CreditCard() {
fun CreditID():String
{
return "2148091"
}
abstract fun newCredir()
}
class UserInfo(): CreditCard() {
fun getInfo(): String {
class UserAdmins<T>(credit:T) {
init {
println(credit)
}
}
fun <T> display(process: T) {
println(process)
}
@vbuterin2
vbuterin2 / mutablelist.kt
Created June 28, 2020 10:40
Mutable List vs Immuatable List
fun main(args: Array<String>) {
val listImmutable = listOf("cdkfox", "bzp")
for (name in listImmutable) {
println(name)
}
// mutable
var listMutable = mutableListOf("cdkfox", "bzp")
listMutable[0] = "cdkfox"