Skip to content

Instantly share code, notes, and snippets.

@afdalwahyu
afdalwahyu / http_proxy.go
Last active June 20, 2024 12:25
golang http proxy server CONNECT method
package main
import (
"bufio"
"encoding/base64"
"flag"
"io"
"io/ioutil"
"log"
"net"
@afdalwahyu
afdalwahyu / main.go
Last active October 16, 2024 12:31
golang dynamic port forward ssh socks5 tunnel
package main
import (
"context"
"fmt"
"net"
"os"
"os/signal"
"syscall"
@afdalwahyu
afdalwahyu / local.pac
Last active September 18, 2019 16:48
function FindProxyForURL(url, host)
{
return "SOCKS 192.168.1.62:1234";
}
@afdalwahyu
afdalwahyu / personal-afdal.zsh-theme
Last active September 5, 2017 14:10
if you're using conda, set config changeps1 to false -> conda config --set changeps1 false
# vim:ft=zsh ts=2 sw=2 sts=2
if [[ $EUID -eq 0 ]]; then
_USERNAME="%{$fg_bold[red]%}%n"
_LIBERTY="%{$fg[red]%}#"
else
_USERNAME="%{$fg_bold[white]%}%n"
_LIBERTY="%{$fg[green]%}$"
fi
_USERNAME="$_USERNAME%{$reset_color%}@%m"
async _loadMore() {
if (this.state.buffering === false) {
this.setState({ buffering: true });
this.props.news.page += 1;
await this.props.news.fetchFeedPage(this.props.news.page);
this.setState({
dataSource: this.state.dataSource.cloneWithRows(this.props.news.feed.toJS()),
buffering: false,
});
}
@afdalwahyu
afdalwahyu / .eslintignore
Created October 31, 2016 10:00
eslint ignore
**/dist/*
**/node_modules/*
**/server.js
**/webpack.config*.js
**/test-utils/setup.js
@afdalwahyu
afdalwahyu / .eslintrc
Created October 31, 2016 09:59
my react-native .eslintrc
{
"extends": "airbnb",
"env": {
"mocha": true
},
"plugins": [
"react-native"
],
"parser": "babel-eslint",
"rules": {
@afdalwahyu
afdalwahyu / designer.html
Last active January 2, 2016 04:56
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../speech-mic/speech-mic.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../google-map/google-map.html">