Skip to content

Instantly share code, notes, and snippets.

View muhikhsan101's full-sized avatar

Muhammad Ikhsan muhikhsan101

  • YoExplore
  • Jakarta, Indonesia
View GitHub Profile
@muhikhsan101
muhikhsan101 / tmux-cheatsheet.markdown
Created November 23, 2017 08:31 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@muhikhsan101
muhikhsan101 / check.go
Created November 22, 2017 12:05 — forked from mattes/check.go
Check if file or directory exists in Golang
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) {
// path/to/whatever does not exist
}
if _, err := os.Stat("/path/to/whatever"); err == nil {
// path/to/whatever exists
}
@muhikhsan101
muhikhsan101 / vineScrape.go
Created October 28, 2017 07:19 — forked from cryptix/vineScrape.go
extract a javascript object value from a html page using goquery and otto
package main
import (
"errors"
"log"
"os"
"github.com/PuerkitoBio/goquery"
"github.com/robertkrimen/otto"
)
#!/usr/bin/perl
# A very simple perl web server used by Webmin
# Require basic libraries
package miniserv;
use Socket;
use POSIX;
# Get miniserv's perl path and location
$miniserv_path = $0;

Using Git to Manage a Live Web Site

###Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

####Contents

@muhikhsan101
muhikhsan101 / gist:c5ddb919807f853496e7749529c1705c
Created October 9, 2017 03:09 — forked from jagregory/gist:710671
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork [email protected]
@muhikhsan101
muhikhsan101 / AndroidManifest.xml
Last active January 29, 2017 07:16
Aplikasi client - Belajar Pemrograman Socket Client – Server Menggunakan Android dan Java
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mikhsan.practice.panggilsaya">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
@muhikhsan101
muhikhsan101 / PanggilSayaServer.java
Last active January 29, 2017 06:55
Kode Program Aplikasi Server dalam Belajar Pemrograman Socket Client - Server Menggunakan Android dan Java
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
class PanggilSayaServer {
public static void main(String[] args) {
ServerSocket serverSocket = null;
@muhikhsan101
muhikhsan101 / class_mobil.php
Last active January 28, 2017 06:05
Pemrograman Berorientasi Objek Menggunakan PHP
<?php
// Membuat rancangan Mobil
class Mobil {
// Beberapa property yg dimiliki oleh Mobil: warna, merek, kecepatan_maksimum, status_mesin (status mesin nyala atau mati)
public $warna;
public $merek;
public $kecepatan_maksimum;
public $status_mesin = "mati";
// method untuk menyalakan mesin mobil