Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am asksven on github.
  • I am asksven (https://keybase.io/asksven) on keybase.
  • I have a public key whose fingerprint is E930 5C88 A41C 5FA8 34A2 4F88 2242 3546 2BC3 DA2B

To claim this, I am signing this object:

@asksven
asksven / BitDescription
Last active August 29, 2015 14:06
Print History Item
885 public static final BitDescription[] HISTORY_STATE_DESCRIPTIONS
886 = new BitDescription[] {
887 new BitDescription(HistoryItem.STATE_BATTERY_PLUGGED_FLAG, "plugged"),
888 new BitDescription(HistoryItem.STATE_SCREEN_ON_FLAG, "screen"),
889 new BitDescription(HistoryItem.STATE_GPS_ON_FLAG, "gps"),
890 new BitDescription(HistoryItem.STATE_PHONE_IN_CALL_FLAG, "phone_in_call"),
891 new BitDescription(HistoryItem.STATE_PHONE_SCANNING_FLAG, "phone_scanning"),
892 new BitDescription(HistoryItem.STATE_WIFI_ON_FLAG, "wifi"),
893 new BitDescription(HistoryItem.STATE_WIFI_RUNNING_FLAG, "wifi_running"),
@asksven
asksven / gist:71dc563dbf1a3e2cc147
Created February 1, 2015 18:20
Mount Azure File Storage account
see also http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx
net use z: \\<storage-account-name>.file.core.windows.net\<share-name> /u:<storage-account-name> <storage-account-key>
@asksven
asksven / BatteryHistoryChart 2.3.4
Created September 28, 2011 18:17
Battery Chart 2.3.4 / 4.01
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@asksven
asksven / ExecResult
Created August 18, 2012 12:22
su exec code
/*
* Copyright (C) 2011 asksven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@asksven
asksven / setup.md
Last active April 2, 2016 21:18
ionic-dev-va

// based on linux mint 17.3

/////////////////////////////////////////

// JAVASCRIPT & NODE DEV

/////////////////////////////////////////

// install nodejs, npm, cordova, ionic

@asksven
asksven / Install tools
Last active April 11, 2016 22:07
Chocolatey install and setup
#choco install google-chrome-x64
#choco install googlechrome.canary
choco install notepadplusplus
choco install git
#choco install firefox
choco install fiddler4
#choco install visualstudio2013ultimate
#choco install velocity
choco install calibre
#choco install popcorntime
@asksven
asksven / gist:08c4c0bb66d6c451c3c0fe90eae4f90a
Last active January 10, 2017 21:10
Ubuntu Server base install
apt-get update && apt-get upgrade
apt-get install openssh-server
# dyndns
apt-get install ddclient
# do/re-do the settings: dpkg-reconfigure ddclient
# 2FA
sudo apt-get install libpam-google-authenticator
# and follow http://askubuntu.com/questions/609117/how-to-setup-two-factor-authentication-in-ubuntu-for-ubuntu-users-using-google-a
@asksven
asksven / gist:8a00af6201a52436c4f2d91083aca1fc
Last active February 27, 2017 11:37
Setup Windows 10 ubuntu subsystem
sudo apt-get update && sudo apt-get upgrade
# we want to use nodejs 6
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y git nodejs-legacy npm
npm config set unsafe-perm true
sudo npm install -g @angular/cli # note: the angular-cli crashes at creating projects with "ng new" so you will have to manually run "npm install" after the project has been created
#add docker client (to be run against e.g. Docker for windows)
sudo apt-get install -y docker.io
# Extensions to install
AutoImport
PowerShell
# Bash as terminal
File -> Preferences -> Settings
and add
```
{
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\bash.exe"