Skip to content

Instantly share code, notes, and snippets.

View jim3ccc's full-sized avatar
:shipit:

Jim jim3ccc

:shipit:
  • Wealthsimple
View GitHub Profile
@jim3ccc
jim3ccc / gist:e432284265fa9744f6ba7b2f5b3953ee
Created February 21, 2018 18:21
git: recreate repository based on current files
cp .git/config /tmp/gitBackup
rm -rf .git
git init
cp /tmp/gitBackup .git/config
git remote add origin <url from 1st command>
git add .
git status
git commit -m "rewrite history"
git push -f
@jim3ccc
jim3ccc / fizz.rb
Created January 23, 2018 23:01 — forked from ggilder/fizz.rb
Fizzbuzz bitwise math
messages = [nil, "Fizz", "Buzz", "FizzBuzz"]
acc = 810092048
(1..100).each do |i|
c = acc & 3
puts messages[c] || i
acc = acc >> 2 | c << 28
end
# Explanation
#
@jim3ccc
jim3ccc / android_studio_shortcuts.md
Created September 10, 2017 18:12 — forked from stkent/android_studio_shortcuts.md
Android Studio Shortcuts (Mac)

Android Studio Shortcuts (Mac)

Notes:

  • Two of the most useful shortcuts utilize the Fn (function) keys. It is therefore recommended that you enable the "Use all F1, F2, etc. keys as standard function keys" option [System Preferences > Keyboard].
  • Be sure to enable the Mac OS X 10.5+ keymap in Android Studio [Preferences > Keymap].
  • A fairly complete shortcut list can be found here.

Useful symbols:

@jim3ccc
jim3ccc / ChatMessage.java
Created February 26, 2017 21:46 — forked from puf/ChatMessage.java
Zero to App: Develop with Firebase (for Android - Google I/O 2016)
package com.google.firebase.zerotoapp;
public class ChatMessage {
public String name;
public String message;
public ChatMessage() {
}
public ChatMessage(String name, String message) {