Skip to content

Instantly share code, notes, and snippets.

View aldoridhoni's full-sized avatar

Aldo Ridhoni aldoridhoni

View GitHub Profile
View WebGLSupport
var supportsWebGL = ( function () { try { return !! window.WebGLRenderingContext && !! document.createElement( 'canvas' ).getContext( 'experimental-webgl' ); } catch( e ) { return false; } } )();
if ( supportsWebGL ) {
alert( 'FTW!' );
}
View Mac OSX NTFS Writable
#!/bin/bash
checkExisting(){
echo "Checking if already existing device on file..."
while read fileLine; do
if [ "$line" = "$fileLine" ]; then
echo "[WARNING] Device already initialized on this system. Nothing to do here"
View port-forward.sh
#
# SSH port forwarding to server
#
remote_ip=8.8.8.8
remote_user=root
local_port=22
remote_port=2222
ssh -f -N -R $remote_ip:$remote_port:localhost:$local_port $remote_user@$remote_ip
@aldoridhoni
aldoridhoni / lock.sh
Last active December 19, 2015 03:48
Sleep and Lock
View lock.sh
#
# Lock current screen from command line
#
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
@aldoridhoni
aldoridhoni / passwd&shadow
Created December 29, 2016 08:01
STB IPTV file tree
View passwd&shadow
root:$1$YinWP4CA$9YsLRT1/rzO2yCHdW4Lx00:0:0:root:/root:/bin/sh
usr:$1$k3sVqeOn$BcweChtGFoYN2n4drIh4n1:1000:1000:Linux User,,,:/var:/bin/sh
dbus:*:81:81:System message bus:/:/sbin/nologin
haldaemon:*:68:68:HAL daemon:/:/sbin/nologin
@aldoridhoni
aldoridhoni / hide-div.md
Last active May 1, 2018 09:24
Hide Ads Div Spotify Client
View hide-div.md

Copy resource from spotify app folder

  • cp /usr/lib64/spotify-client/Apps/zlink.spa ~/

Unzip

  • unzip zlink.spa -d zlink

Find file index.html.

  • Search for `view-billboard-ad'
  • Add data-bind="visible: null"
  • Save file

Zip folder

  • cd zlink; zip --quiet --recurce-paths ../zlink.spa ./
@aldoridhoni
aldoridhoni / gmaps-dl.sh
Created July 30, 2018 01:43
Download Google Maps Images
View gmaps-dl.sh
#!/bin/bash
function show_help
{
echo "Usage: $0 (-x xcoord) (-y ycoord) (-l level)"
echo " [-r x width] [-s y width] -h for help"
}
if [ $# -le 1 ]; then
show_help
@aldoridhoni
aldoridhoni / zte_extract.py
Created August 1, 2018 04:10 — forked from ndunks/zte_extract.py
Modem Indihome ZTE F609 Config Extract and Repack
View zte_extract.py
#!/usr/bin/env python
# https://reverseengineering.stackexchange.com/a/13395
import sys
import binascii
import struct
import zlib
if (len(sys.argv) <= 1):
print('USAGE:\n%s [configBak.cfg|config.bin]' % sys.argv[0])
exit(1)
@aldoridhoni
aldoridhoni / scribus-sequential-numbering.py
Last active October 27, 2018 12:52
Scribus script for looping all textbox and created number for doorprize.
View scribus-sequential-numbering.py
page = 1
pagenum = scribus.pageCount()
content = []
number = 0
copies = 2 ### how many times number are displayed
current_pos = 1
while (page <= pagenum):
scribus.gotoPage(page)
d = scribus.getPageItems()
for item in d:
@aldoridhoni
aldoridhoni / remove.sh
Created April 21, 2019 02:47
Manually delete gnome shell extension
View remove.sh
# Using gdbus
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Extensions.UninstallExtetension "(TopIcons@phocean.net)"
##
gnome-shell-extension-tool -d no-title-bar@franglais125.gmail.com