Skip to content

Instantly share code, notes, and snippets.

Avatar

Diki Ananta dikiaap

View GitHub Profile
@dikiaap
dikiaap / xkcd-dl
Last active Oct 11, 2019
Bash script to download xkcd comics
View xkcd-dl
#!/usr/bin/env bash
# Print usage message.
usage() {
local program_name
program_name=${0##*/}
cat <<EOF
Usage: $program_name [-option]
Options:
-h Print this message
@dikiaap
dikiaap / erase_all_jobs.sh
Created Mar 6, 2019 — forked from btgoodwin/erase_all_jobs.sh
GitLab EE/CE V4 API: Erase all jobs for project
View erase_all_jobs.sh
#!/usr/bin/env bash
# Author: Thomas Goodwin
# Company: Geon Technologies
# Purpose: Erase all jobs for a given GitLab project.
# Arguments:
# 1) URL of gitlab project (https://some.server.com/group/[group/]project)
# 2) private token (personal access token, impersonation token, etc.)
#
# Requirements: bash > 4.0, jq
View whitespace-character.txt
Whitespace character
‌‌‎
^
View git-io-custom-url.md

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
  • https://*.github.com/*
  • https://*.github.io
@dikiaap
dikiaap / daftar-situs-scam-dan-judi.txt
Last active Oct 30, 2019
Daftar Situs Scam dan Judi dari Nawala untuk /etc/hosts file
View daftar-situs-scam-dan-judi.txt
0.0.0.0 pelangiplaza.blogspot.com
0.0.0.0 megaponselshop.webs.com
0.0.0.0 anugrahpratama7.wordpress.com
0.0.0.0 bintangtoedjoe.co.cc
0.0.0.0 solusiejakulasidini.com
0.0.0.0 sediaobat.com
0.0.0.0 adaobatkuat.com
0.0.0.0 obatkuat-kecantikan.com
0.0.0.0 rumahobatkuat.com
0.0.0.0 obatkuat-cosmeticimport.com
@dikiaap
dikiaap / command-line-cheatsheet.md
Last active Jan 31, 2019
Command Line Cheatsheet
View command-line-cheatsheet.md

dotfiles ~/

dikiaap/dotfiles

Linux

  • Disable packages on Debian-based distro
    • sudo apt-mark hold package-name
  • Print the build date of Linux kernel using ISO 8601 format
    • uname -v | awk '{print $6,$5,$4,$8,$7;}' | xargs -I{} date -d "{}" "+%Y-%m-%d"
  • Remove config files
    • dpkg --list | grep '^rc' | awk '{ print $2 }' | xargs sudo apt-get purge