Skip to content

Instantly share code, notes, and snippets.

@alexellis
alexellis / k8s-pi.md
Last active June 28, 2025 05:44
K8s on Raspbian
@cmelchior
cmelchior / BarListParcelConverter.java
Last active August 29, 2019 09:46
Using Parceler 1.0.3 with Realm
// Specific class for a RealmList<Bar> field
public class BarListParcelConverter extends RealmListParcelConverter<Bar> {
@Override
public void itemToParcel(Bar input, Parcel parcel) {
parcel.writeParcelable(Parcels.wrap(input), 0);
}
@Override
public Bar itemFromParcel(Parcel parcel) {
@jnhuynh
jnhuynh / gist:86693d8b485f4d335300
Last active February 7, 2018 07:10
React Native Directory Structure
.
├── index.ios.js
├── js
│   ├── actions
│   │   ├── ChatServerActionCreators.js
│   │   └── ChatThreadActionCreators.js
│   ├── components
│   │   ├── ChatScreen
│   │   │   ├── index.js
@yeokm1
yeokm1 / Read-only FS on Arch Linux ARM.md
Last active July 17, 2024 01:31
Set up Arch Linux ARM on Raspberry Pi to boot from and use a read-only file-system

Read-only FS on Arch Linux ARM

Unlike your typical computer where you usually shutdown properly, I cannot rely on this during the use of my Raspberry Pi. If the Raspberry Pi is improperly shutdown too many times, data corruption in the file system leading to unbootable SD card may result. So we should use a read-only file system.

Full instructions and explanations are obtained from this link but you can run these commands directly. I modified some of the instructions for personal convenience.

Login with default username: alarm, password: alarm

#Optionally enable root over SSH. The rest of these instructions assume u are in root.
@witochandra
witochandra / xortree.py
Last active August 29, 2015 14:03
XOR tree
# 429A
# Xor-tree
class Node:
def __init__(self, name, value, parent = None):
self.name = 0
self.value = 0
self.grandChildren = list()
self.setParent(parent)
@staltz
staltz / introrx.md
Last active October 14, 2025 19:39
The introduction to Reactive Programming you've been missing
@WebReflection
WebReflection / gist:5084045
Last active January 15, 2018 22:52
Boot to node: An Arch Linux on Raspberry PI + WiFi + node.js quick guide through
# these info are valid today
# 4th March 2013
# flush latest Arch for Pi dist
# via dd or other ways
# With A DHCPed Network Cable
pacman -Syu
sync
reboot
@m3nd3s
m3nd3s / NERDTree.mkd
Last active September 27, 2025 02:40
My Vim Cheat Sheet

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|