Skip to content

Instantly share code, notes, and snippets.

View rikyperdana's full-sized avatar
💭
Alhamdulillah

Riky Perdana rikyperdana

💭
Alhamdulillah
View GitHub Profile
@rikyperdana
rikyperdana / Daftar Perintah Ubuntu
Last active January 10, 2017 11:56
Daftar Perintah Ubuntu
rename -v ’s/\.htm$/\.html/’ *.htm
Batch rename all files in directory (dari .htm ke .html)
sudo sed -i 's/http:\/\/id./http:\/\//g' /etc/apt/sources.list
Ganti repo source dari server id ke server main
cp -avu /arsip_sumber /arsip_tujuan
Kopi sebuah folder dan isinya ke folder tujuan hanya yg terbaru sambil lihat progress
rm -r /arsip_yg_mau_dihapus
@rikyperdana
rikyperdana / Daftar Perintah Docker
Last active January 27, 2021 02:11
Daftar Perintah Docker
INSTALL Docker
sudo apt install docker.io
service docker start
docker run hello-world
PULL IMAGES
Browsing google atau hub.docker.com
docker pull nama_image
SHOW CONTAINERS
@rikyperdana
rikyperdana / Daftar Perintah Git
Last active June 18, 2024 14:40
Daftar Perintah Git
Upload project
Di web github, login dan create repository baru sesuai nama aplikasi
Di komputer
cd /var/www/html/aplikasi/
git init
git remote add origin https://github.com/rikyperdana/aplikasi.git
git remote -v
git add .
git commit -m 'Upload pertama'
git push -u origin master
@rikyperdana
rikyperdana / Daftar Perintah transfer.sh
Last active January 10, 2017 11:54
Daftar Perintah transfer.sh
INSTALL TRANSFER.SH
nano ~/.bashrc
tambahkan coding ini
transfer() { if [ $# -eq 0 ]; then echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi
tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; }
source ~/.bashrc
UPLOAD KE TRANSFER.SH
transfer ./nama_file.eks
@rikyperdana
rikyperdana / Kitchen Plugin Template
Last active January 10, 2017 11:54
Kitchen Plugin Template
# Any plugin we create has to be in it's own folder ~/.meteor-kitcen/plugins/plugin_name
# And has to contain plugin.js and plugin.json
# Content of plugin.js
var kitchen = require('meteor-kitchen');
var component = kitchen.getInput();
var prop1 = component.properties.prop1;
var prop2 = component.properties.prop2;
if (prop1 === undefined) {var prop1 = value1;}
@rikyperdana
rikyperdana / android-sdk-linux-cli
Last active August 21, 2018 01:07 — forked from wenzhixin/ubuntu14.04-command-line-install-android-sdk
Ubuntu 14.04 command line install android sdk
# install openjdk
sudo apt-get install openjdk-7-jdk lib32stdc++6 lib32z1
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
# install all sdk packages
cd android-sdk-linux/tools
./android update sdk --no-ui
@rikyperdana
rikyperdana / Kitchen Plugin Leaflet Mapbox
Last active January 15, 2017 13:45
Kitchen Plugin Leaflet Mapbox
mkdir ~/.meteor-kitchen/plugins/leaflet
then create plugin.js and plugin.json and copy the codes below
after that, you can use recipe.yaml below to create your sample app
FOR PLUGIN.JS
var kitchen = require('meteor-kitchen');
var component = kitchen.getInput();
var zoom = component.properties.zoom;
@rikyperdana
rikyperdana / meteorandroid.sh
Last active October 9, 2017 01:20
Shell Script for building Meteor Android
# Prepare android-sdk-linux-cli with https://gist.github.com/rikyperdana/61b1a5008b757da35a745185bfed7374
# Update your android sdk to the latest on android-sdk-linux/tools with
# android list sdk --all
# android update sdk -u -a -t <package num>
# Copy this meteorandroid.sh to your project folder, and then chmod +x meteorandroid.sh
# We will use 2 params, app_name and server_address
# Example, meteorandroid.sh sample http://localhost:3000
meteor add-platform android
meteor build ../apk_$1 --server=$2
@rikyperdana
rikyperdana / meteor-restivus
Created July 13, 2017 18:31
Meteor Restivus Tutorial
# Do it in bash
meteor create --bare rest; cd rest; meteor npm install; meteor
meteor add coffeescript nimble:restivus
# Write these in both.coffee
@Items = new Mongo.Collection 'items'
# Write these in server.coffee
if Meteor.isServer
@rikyperdana
rikyperdana / nanorc
Created September 15, 2017 18:49
Nano bind keys
# put these lines on ~/.nanorc
bind ^i up main
bind ^j left main
bind ^k down main
bind ^l right main
bind ^s writeout main
bind ^x cut main
bind ^v uncut main
bind ^z undo main
bind ^y redo main