Skip to content

Instantly share code, notes, and snippets.

@htruong
htruong / chroot-to-pi.sh
Last active July 7, 2024 08:16
Chroot to pi sd card
#!/bin/bash
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
# make sure you have issued
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@bennuttall
bennuttall / onboard_leds.py
Created February 8, 2016 23:24
Programming the onboard LEDs (activity and power lights) with GPIO Zero
from gpiozero import LED
from time import sleep
from signal import pause
red = LED(35)
green = LED(47)
def blink(n):
red.blink(n, n)
sleep(n)
@mraccola
mraccola / DateUtils.java
Last active August 10, 2021 23:29
Android DateUtils for RFC 1123 dates and ISO 8601 dates
package org.wta.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
public final class DateUtils {
@mamiu
mamiu / .promptline.fish
Last active October 29, 2015 15:44
This is a fish script for a powerline like prompt in the fish shell. To use it, just source this script with ". /path/to/.promptline.fish" (without the quotation marks) in your ~/.config/fish/config.fish! Have fun :)
# to use this script you need the latest fish version (2.1.x)
begin
########## USER CONFIG ##########
# enable or disable the different parts of promptline with yes or no
set show_only_left_prompt no
set show_hostname no
set show_virtual_env yes
set show_username yes
set show_current_working_directory yes
set show_git_branch yes
# Resurrection Remix OS - Marshmallow
Source Code: http://github.com/ResurrectionRemix
G+: https://plus.google.com/communities/109352646351468373340
Resurrection Remix Crowdin : https://crowdin.com/project/resurrectionremix/
For extended changelog, track github activities
# The Changelog
@aras-p
aras-p / preprocessor_fun.h
Last active July 16, 2024 02:50
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@lmacken
lmacken / countdown.py
Last active March 29, 2022 11:45
A fullscreen countdown timer
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# A fork of pyglet's timer.py by Luke Macken
#
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met: