Skip to content

Instantly share code, notes, and snippets.

View geekygecko's full-sized avatar

Philip Simpson geekygecko

View GitHub Profile
@geekygecko
geekygecko / cheatsheet.kt
Last active May 6, 2023 08:23
Kotlin beginners cheatsheet
fun main(args: Array<String>) {
// when statement
val firstName = "Dan"
val job = when (firstName) {
"Dan", "Jay", "Philip" -> "programmer"
"Jamie" -> "designer"
else -> "boss"
}
println("$firstName is a $job")
@geekygecko
geekygecko / android.md
Last active October 14, 2022 19:32
Android Cheat Sheet

Android Cheat Sheet

Developer tips

Record a video of your app

Developer options -> Check show touches
adb shell screenrecord /sdcard/video.mp4
adb pull /sdcard/video.mp4
@geekygecko
geekygecko / bash.md
Last active August 29, 2015 14:01
Bash Cheet Sheet

Bash Cheat Sheet

Basics

# declare the file as a bash script
#!/bin/bash
# debug a script
bash -x script.sh
# variables
@geekygecko
geekygecko / homebrew.sh
Created March 10, 2012 23:54
Homebrew
# Howebrew package manager for OS X is useful for installing unix terminal tools.
# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
# Install wget
brew install wget
brew install openssl
# Update homebrew and all your packages
@geekygecko
geekygecko / scripts.rb
Created March 9, 2012 04:07
Ruby Scripts
# header
#!/usr/bin/env ruby
# require gem libraries
require 'rubygems'
require 'fileutils'
# get the current directory
dir = File.expand_path(File.dirname(__FILE__))
# Update your RVM to the latest statble version.
rvm get latest
# Update your RVM to the most recent version. (most bug fixes)
rvm get head
# Reinstall all your Rails gemset gems
rvm gemset empty project_gem_set && gem install bundler && bundle install
# How to fix Mac issue: `require': no such file to load -- iconv