Skip to content

Instantly share code, notes, and snippets.

View PeterWaIIace's full-sized avatar
💘
In love with computational evolution

W4ltz PeterWaIIace

💘
In love with computational evolution
View GitHub Profile
@fourplusone
fourplusone / main.swift
Last active June 1, 2024 05:13
SwiftUI Command Line App
import SwiftUI
struct MainApp : App {
var body: some Scene {
WindowGroup {
Text("Hello").padding()
}
}
}
@mpaepper
mpaepper / android-ubuntu
Last active October 14, 2024 10:42
How to debug your Android device under Ubuntu
When programming apps for Android, you usually want to test them on real Android devices.
This little gist describes how to do so using Ubuntu 14.
First, you need to download and install the Android development IDE (http://developer.android.com/sdk/index.html) and create an Android project which you want to debug.
Next, you need to setup the debugging mode on your Android device. Starting in Android 4.2 you need to enable the developer options first: 1) Go to settings 2) Go to About Phone 3) Tap the build number 10 times (or more, not sure ;)) and you will get the notification that you enabled it.
Then go to the developer settings and enable the debug mode for your phone.
Now you think you can just plug it into your USB mode? - Nope.
@Cairnarvon
Cairnarvon / pypistats.py
Created February 5, 2013 15:17
Graphs downloads per day for PyPI packages using gnuplot, because vanity. Usage: ./pypistats.py packagename
#!/usr/bin/env python
import bz2
import datetime
import os
import sys
import time
import urllib2
import warnings