start new:
tmux
start new with session name:
tmux new -s myname
| Microsoft's Symbolic Plan | |
| ========================= | |
| (Redmond, Microsoft HQ. One year before Windows Vista release. Meeting.) | |
| Marketing VC: | |
| Our latest marketing research suggests that UNIX has a | |
| competitive advantage: _symbolic links_. |
| /* Read this comment first: https://gist.github.com/tonious/1377667#gistcomment-2277101 | |
| * 2017-12-05 | |
| * | |
| * -- T. | |
| */ | |
| #define _XOPEN_SOURCE 500 /* Enable certain library functions (strdup) on linux. See feature_test_macros(7) */ | |
| #include <stdlib.h> | |
| #include <stdio.h> |
| private boolean isServiceRunning() { | |
| ActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE); | |
| for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)){ | |
| if("com.example.MyNeatoIntentService".equals(service.service.getClassName())) { | |
| return true; | |
| } | |
| } | |
| return false; | |
| } |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Windows 8 Loading Animation · CodePen</title> | |
| <!-- | |
| Copyright (c) 2012 Jan Rubio, http://codepen.io/janrubio | |
| Permission is hereby granted, free of charge, to any person obtaining |
Problem: When linking to the raw version of a gist, the link changes with each revision.
Solution:
To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/
To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| <?xml version="1.0" encoding="utf-8"?> | |
| <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > | |
| <!-- Drop Shadow Stack --> | |
| <item> | |
| <shape> | |
| <padding | |
| android:bottom="1dp" | |
| android:left="1dp" | |
| android:right="1dp" |
| extern mod native; | |
| use std::io::net::unix::UnixStream; | |
| use std::path::posix::Path; | |
| use std::str; | |
| use std::rt::rtio::IoFactory; | |
| use native::io; | |
| fn main() { |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; | |
| import java.net.URL; | |
| import java.net.URLConnection; | |
| import java.util.Locale; | |
| import java.util.PropertyResourceBundle; | |
| import java.util.ResourceBundle; | |