tmux new [-s name] [cmd](:new) - new session
tmux ls(:ls) - list sessionstmux switch [-t name](:switch) - switches to an existing session
| // Dumps an object in JSON. Works with circular structures like: | |
| // | |
| // var o = {}; | |
| // o.o = o; | |
| JSON.stringifyOnce = function(obj, replacer, indent){ | |
| var printedObjects = []; | |
| var printedObjectKeys = []; | |
| function printOnceReplacer(key, value){ | |
| if ( printedObjects.length > 2000){ // browsers will not print more than 20K, I don't see the point to allow 2K.. algorithm will not be fast anyway if we have too many objects |
| // C++ includes used for precompiling -*- C++ -*- | |
| // Copyright (C) 2003-2013 Free Software Foundation, Inc. | |
| // | |
| // This file is part of the GNU ISO C++ Library. This library is free | |
| // software; you can redistribute it and/or modify it under the | |
| // terms of the GNU General Public License as published by the | |
| // Free Software Foundation; either version 3, or (at your option) | |
| // any later version. |
| package main | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "fmt" | |
| "strconv" | |
| ) | |
| func main() { |
I hereby claim:
To claim this, I am signing this object:
Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell and then run-as com.mypackage
( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs),
but on a production release app downloaded from an app store you're most likely to see:
run-as: Package 'com.mypackage' is not debuggable
| #!/bin/sh | |
| # this script does absolutely ZERO error checking. however, it worked | |
| # for me on a RHEL 6.3 machine on 2012-08-08. clearly, the version numbers | |
| # and/or URLs should be made variables. cheers, zmil...@cs.wisc.edu | |
| mkdir mosh | |
| cd mosh |
| declare -A hashmap | |
| hashmap["key"]="value" | |
| hashmap["key2"]="value2" | |
| echo "${hashmap["key"]}" | |
| for key in ${!hashmap[@]}; do echo $key; done | |
| for value in ${hashmap[@]}; do echo $value; done |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| JSON server, which serves local directory static files according to file's basename. | |
| echo '{"key": "valuy"}' > resp.json | |
| python -m JsonServer | |
| curl http://localhost:8000/resp | |
| """ |
| #!/usr/bin/bash | |
| # Create an environment variable for the correct distribution | |
| export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" | |
| # Add the Cloud SDK distribution URI as a package source | |
| echo "deb https://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list | |
| # Import the Google Cloud Platform public key | |
| curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - |