Skip to content

Instantly share code, notes, and snippets.

@Andorbal
Andorbal / Android Privacy Policy Template
Created October 8, 2017 22:58 — forked from alphamu/Android Privacy Policy Template
A template for creating your own privacy policy for Android apps. Look for "[" and "<!--" to see where you need to edit this app in order to create your own privacy olicy.
<html>
<body>
<h2>Privacy Policy</h2>
<p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and
disclosure of Personal Information if anyone decided to use [my|our] Service.</p>
<p>If you choose to use [my|our] Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that [I|we] collect are used for providing and
improving the Service. [I|We] will not use or share your information with anyone except as described
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
NODEREPO=node_8.x
DISTRO=`lsb_release -c -s`
echo "deb https://deb.nodesource.com/${NODEREPO} ${DISTRO} main" > /etc/apt/sources.list.d/nodesource.list
echo "deb-src https://deb.nodesource.com/${NODEREPO} ${DISTRO} main" >> /etc/apt/sources.list.d/nodesource.list
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
@Andorbal
Andorbal / gist:7232858892662745605d
Last active January 6, 2016 12:56
Docker command to start an interactive dotnet session
Assuming you have Docker installed (https://docs.docker.com/linux/), you can run this as step zero of the 'Running the code' section of the tutorial at http://numl.net/getting-started/
docker run -it --name dotnet-numl -v "$PWD":/myapp -w /myapp microsoft/dotnet:latest
Then, you can run:
dotnet restore
dotnet run
If you've already created the container, then you can start and attach to it using:
docker start -ai dotnet-numl
@Andorbal
Andorbal / gist:36545663bf1b6b8e9d0f
Created March 19, 2015 15:56
Deep nested conditionals
var foo = IsThing1True ? "Thing 1":
IsThing2True ? "Thing 2":
IsThing3True ? "Thing 3":
IsThing4True ? "Thing 4":
IsThing5True ? "Thing 5":
IsThing6True ? "Thing 6":
IsThing7True ? "Thing 7":
IsThing8True ? "Thing 8":
"Thing 9";
@Andorbal
Andorbal / Program.cs
Created January 22, 2013 16:59
Basic program shell for running a Windows service from the console.
using System;
using System.ServiceProcess;
namespace ServiceTest
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
@Andorbal
Andorbal / Service1.cs
Created January 22, 2013 16:54
Basic service shell for running a Windows service from the console.
using System.ServiceProcess;
namespace ServiceTest
{
public partial class Service1 : ServiceBase
{
public Service1()
{
InitializeComponent();
}
# 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL
# 0.2 If you are on the Mac, make sure you have a c compiler by installing XCode Command Line Tools or gcc4.2 with homebrew
# https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers
# 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it
gem install bundler
# 1. Get edge Rails source (master branch)
git clone https://github.com/rails/rails.git
@Andorbal
Andorbal / gist:4393713
Created December 28, 2012 01:28
Reset "someone's" wireless...
sudo rfkill unblock all
@Andorbal
Andorbal / gist:4393674
Last active December 10, 2015 06:18
Bashrc to show the current status of git.
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
function parse_git_branch {
ref=$(git-symbolic-ref HEAD 2> /dev/null) || return
echo "("${ref#refs/heads/}")"
}
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
@Andorbal
Andorbal / gist:1978720
Created March 5, 2012 15:21
Restart a windows service
@ECHO OFF
sc query <servicename> | find "STATE" | find "RUNNING" > nul 2>&1
if .%errorlevel%.==.0. goto skip
sc start <servicename> > nul 2>&1
echo service restarts @ %date% %time% >> checklog.txt
:skip