Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

maulvi

🏠
Working from home
Block or report user

Report or block maulvi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@maulvi
maulvi / softether.sh
Last active Nov 13, 2019
Softether entware startup, place this file at /usr/local/etc/rc.d
View softether.sh
#!/bin/sh
case $1 in
start)
/opt/etc/init.d/S05vpnserver start
;;
stop)
;;
esac
@maulvi
maulvi / SetupSSHForwardingOnQNAP.md
Created Nov 5, 2019 — forked from smuda/SetupSSHForwardingOnQNAP.md
Setup SSH forwarding on QNAP NAS
View SetupSSHForwardingOnQNAP.md

On receiving NAS:

setcfg LOGIN "SSH AllowTcpForwarding" TRUE
reboot

On client to forward local port 8443 to the QNAP admin interface:

ssh user@host -L 8443:localhost:443
View sources.list
deb http://mirror.0x.sg/ubuntu/ xenial main restricted universe
deb-src http://mirror.0x.sg/ubuntu/ xenial main universe
###### Ubuntu Update Repos
deb http://mirror.0x.sg/ubuntu/ xenial-security main restricted universe
deb http://mirror.0x.sg/ubuntu/ xenial-updates main restricted universe
@maulvi
maulvi / nama.txt
Last active Oct 24, 2019
Nama2 orang indonesia
View nama.txt
aan
abdul
abdullah
abidin
abie
achmad
adam
ade
adhi
adhitya
@maulvi
maulvi / kota.txt
Created May 25, 2019
nama kota Indonesia
View kota.txt
teupahselatan
simeuluetimur
teupahbarat
teupahtengah
simeuluetengah
telukdalam
simeuluecut
salang
simeuluebarat
alafan
View gist:f39a47b712a8c991724a76cceaecb69b
Memuat data ke dalam Apache pig dari sistem file (HDFS / Lokal) menggunakan operator LOAD.
a = LOAD 'test_set_tweets.txt' AS (id:chararray, ts:chararray, tweet:chararray);
Fungsi FLATTEN(TOKENIZE ini digunakan untuk split string dan LOWER mengubah semua karakter dalam string menjadi huruf kecil.
b = foreach a generate tweet, FLATTEN(TOKENIZE(LOWER(tweet))) as tokens;
Fungsi yang digunakan memfilter string yang diawali dengan hashtag
c = filter b by tokens MATCHES '#\\s*(\\w+)';
Operator GROUP digunakan untuk mengelompokkan data dalam satu atau beberapa string.
@maulvi
maulvi / gist:070bb48ab462499db126d9ad96876559
Created Jul 6, 2018
fix brightness waking up from sleep/suspend
View gist:070bb48ab462499db126d9ad96876559
For waking up from suspension, I create the following script /etc/pm/sleep.d/brightness:
```shell
#!/bin/sh
case "$1" in
resume|thaw)
echo 170 > /sys/class/backlight/intel_backlight/brightness
;;
esac
```
View debloat.txt
rm -rf system/app/AntHalService
rm -rf system/app/Apollo
rm -rf system/app/BasicDreams
rm -rf system/app/BookmarkProvider
rm -rf system/app/Browser
rm -rf system/app/CellBroadcastReceiver
rm -rf system/app/CMFileManager
rm -rf system/app/CMHome
rm -rf system/app/CMWallpapers
rm -rf system/app/DashClock
@maulvi
maulvi / client.py
Last active Jun 20, 2018
Socket chat room Caesar cipher
View client.py
import socket
import select
import sys
import string
key = 'abcdefghijklmnopqrstuvwxyz'
def encrypt(n, plaintext):
"""Encrypt the string and return the ciphertext"""
result = ''
View gist:9a16d54d586fd84a5bc070ccfe506cc0
Through the Rod Smith’s guidance and a few dirty tricks, I was successfully able to convert my GPT partition – without data loss or deleting any partitions – and then boot Windows 7 in legacy/MBR mode. In order to do this you’ll need your Windows installation media at hand as well as a copy of the Fedora 16 Live media. If you don’t have a copy of Fedora 16 Live handy, you can download the Live media ISO (64-bit) from a local mirror here
Keep in mind that at this point I only had 3 partitions and a bunch of unpartitioned space on the disk, so conversion was a rather straightforward process (all GPT partitions mapped directly to primary partitions). Although it is theoretically possible to convert GPT partitions with >4 partitions by defining which ones are to be logical partitions after conversion, I have not tested this.
Boot your Fedora 16 Live media and wait for your session to start. If you’re having troubles booting, press Tab at the boot loader screen and try booting with the nomodeset parameter ad
You can’t perform that action at this time.