Skip to content

Instantly share code, notes, and snippets.

@s4l1h
s4l1h / frps
Created August 15, 2018 18:11
frps
#!/bin/sh
# chmod +x /etc/init.d/frps
# update-rc.d frps defaults
# update-rc.d frps enable
### BEGIN INIT INFO
# Provides: frps
# Required-Start: $local_fs $network
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
@s4l1h
s4l1h / v5.go
Created March 8, 2018 17:23
Golang JSON ve interface kullanımı.(v5)
package main
import (
"encoding/json"
"fmt"
)
// Person object
type Person struct {
FirstName, LastName string // Küçük harf olursa json kütüphanesi erişemeyecek.
@s4l1h
s4l1h / v4.go
Created March 8, 2018 17:06
Golang JSON ve interface kullanımı.(v4)
package main
import (
"encoding/json"
"fmt"
)
// Person object
type Person struct {
FirstName, LastName string // Küçük harf olursa json kütüphanesi erişemeyecek.
@s4l1h
s4l1h / v3.go
Created March 8, 2018 16:54
Golang JSON ve interface kullanımı.(v3)
package main
import (
"encoding/json"
"fmt"
)
// Person object
type Person struct {
FirstName, LastName string // Küçük harf olursa json kütüphanesi erişemeyecek.
@s4l1h
s4l1h / v2.go
Created March 8, 2018 16:48
Golang JSON ve interface kullanımı.(v2)
package main
import (
"encoding/json"
"fmt"
)
// Person object
type Person struct {
FirstName, LastName string // Küçük harf olursa json kütüphanesi erişemeyecek.
@s4l1h
s4l1h / v1.go
Created March 8, 2018 16:44
Golang JSON ve interface kullanımı.(v1)
package main
import (
"encoding/json"
"fmt"
)
// Person object
type Person struct {
FirstName, LastName string // Küçük harf olursa json kütüphanesi erişemeyecek.
acl CONNECT method CONNECT
# line 919: add (define ACL for internal)
acl lan src 10.0.0.0/24
http_access allow localhost
# line 1058: add (set ACL for internal)
http_access allow lan
http_access allow all
http_port 3120
via off
forwarded_for delete
@s4l1h
s4l1h / function.run.php
Last active November 9, 2017 14:08
Smarty call_user_func
<?php
// file : /smartyplugins/function.run.php
function smarty_function_run($params, $template)
{
//var_dump($params);
if ($params['method'] == '') {
trigger_error("url: run Komutunda method parametresi boş olamaz.");
return;
}
@s4l1h
s4l1h / convert.sh
Last active January 25, 2017 23:15
Multiple File Encoding Conversion Raw
#!/bin/bash
# Test On Mac OS X
#
#enter input encoding here
FROM_ENCODING="ISO-8859-9"
#output encoding(UTF-8)
TO_ENCODING="UTF-8//TRANSLIT"
#convert
#iconv -f ISO-8859-9 -t UTF-8//TRANSLIT index.php -o index.php.utf8
CONVERT="iconv -f $FROM_ENCODING -t $TO_ENCODING"
package main
import (
"fmt"
"sync"
)
// Hit objemiz
type Hit struct {
count int