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
trait X { | |
fn y(&self); | |
} | |
struct N { | |
foo: String, | |
} | |
impl X for N { | |
fn y(&self) { |
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
const SerialPort = require('serialport') | |
const Readline = require('@serialport/parser-readline') | |
const request = require('request'); | |
var iconv = require('iconv-lite'); | |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
var ic = new require('iconv').Iconv('UTF-8', 'UCS-2'); | |
const app = express() | |
const express_port = 34343 |
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
const TelegramBot = require('node-telegram-bot-api'); | |
const Twitter = require('twitter'); | |
const sqlite3 = require('sqlite3').verbose(); | |
var client = new Twitter({ | |
consumer_key: '**********', | |
consumer_secret: '**********', | |
access_token_key: '**********', | |
access_token_secret: '**********' | |
}); |
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" | |
) | |
type Movable interface { | |
Translate(dx int, dy int) | |
} |
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 | |
echo 1 >| /proc/sys/net/ipv4/ip_forward | |
echo 0 >| /proc/sys/net/ipv4/conf/all/rp_filter | |
iptables -F | |
iptables -t mangle -F | |
iptables -t mangle -X | |
iptables -t nat -F | |
iptables -t nat -X |
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 | |
echo 1 >| /proc/sys/net/ipv4/ip_forward | |
echo 0 >| /proc/sys/net/ipv4/conf/all/rp_filter | |
iptables -F | |
iptables -t mangle -F | |
iptables -t mangle -X | |
iptables -t nat -F | |
iptables -t nat -X |
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
1. Install ssr client: | |
https://github.com/shadowsocksrr/electron-ssr | |
or | |
https://github.com/ShadowsocksR-Live/shadowsocksr-native | |
2. Edit /etc/ssr-native/config.json |
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
#!/usr/bin/env python3 | |
from scapy.all import * | |
import threading | |
interface_left_name = "Wi-Fi" | |
interface_left_default_gateway = "192.168.1.1" | |
interface_right_name = "SSTAP 1" | |
conf.verb = 0 |
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
const Binance = require('node-binance-api'); | |
const binance = new Binance().options({ | |
APIKEY: '***', | |
APISECRET: '***' | |
}); | |
const low = require('lowdb') | |
const FileSync = require('lowdb/adapters/FileSync') |
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
{ | |
"pairs": [ | |
{ | |
"symbol": "BNBBUSD", | |
"price": "206.50010000" | |
}, | |
{ | |
"symbol": "BTCBUSD", | |
"price": "51875.51000000" | |
}, |