Skip to content

Instantly share code, notes, and snippets.

Avatar
🎧

Afdal Wahyu afdalwahyu

🎧
View GitHub Profile
@afdalwahyu
afdalwahyu / http_proxy.go
Last active Oct 17, 2019
golang http proxy server CONNECT method
View http_proxy.go
package main
import (
"bufio"
"encoding/base64"
"flag"
"io"
"io/ioutil"
"log"
"net"
@afdalwahyu
afdalwahyu / main.go
Last active Feb 21, 2021
golang dynamic port forward ssh socks5 tunnel
View main.go
package main
import (
"context"
"fmt"
"net"
"os"
"os/signal"
"syscall"
View local.pac
function FindProxyForURL(url, host)
{
return "SOCKS 192.168.1.62:1234";
}
@afdalwahyu
afdalwahyu / personal-afdal.zsh-theme
Last active Sep 5, 2017
if you're using conda, set config changeps1 to false -> conda config --set changeps1 false
View personal-afdal.zsh-theme
# 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"
View gist:ff1572ef4fca3ed5a22b99afad82bd17
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,
});
}
View .eslintignore
**/dist/*
**/node_modules/*
**/server.js
**/webpack.config*.js
**/test-utils/setup.js
@afdalwahyu
afdalwahyu / .eslintrc
Created Oct 31, 2016
my react-native .eslintrc
View .eslintrc
{
"extends": "airbnb",
"env": {
"mocha": true
},
"plugins": [
"react-native"
],
"parser": "babel-eslint",
"rules": {
View designer.html
<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">