start new:
tmux
start new with session name:
tmux new -s myname
| 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 | |
| } |
| 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; |
###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.
| 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] |
| <?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" |
| 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; |
| <?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 |
ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats