View breaking-changes.md
  • [46dc46a] changes when we clear the current activity from the ReactContext: moved it from onPause to onDestroy. This is generally good news, as you have access to the Activity in more situations, but if you were relying on the Activity being null in paused state, you'll need to change your code.
  • [0b5c612] changes how we forward Activity lifecycle events to listeners: we no longer send events generated by background Activities. The biggest implication of this is probably that, if you are using multiple React Activities, won't receive onHostDestroy() until the last React Activity is destroyed. Furthermore, if you're writing your own custom activities, make sure to call the new API (ReactInstanceManager#onHostPause(Activity) and co.) to benefit from this.
  • [3c4fd42] adds a FragmentActivity-based React Activity class, to support using libraries that rely on this. In order to achieve DRY, most of the Activity methods (onCreate, getReactNativeHost etc.) are now delegated to `ReactAc
View cloudflare_dynamic_dns.py
#!/usr/bin/python
# Set up a new A record in Cloudflare, add the details of it along with your account details below
# Make sure this script runs on startup (or whenever you get a new IP...)
#
# Updated for Python 3.
#
# @author Aaron Rice <aaron@duedil.com>
# @author Felix Oghină <felix@oghina.com>
View gist:5336270
PS1='\[\033[1;32m\]\w`__git_ps1`€\[\033[0m\] '
View bashsurv.sh
#!/bin/bash
OUTPUT_DIR="/var/www/bashsurv"
FFMPEG_INPUT_FLAGS="-rtsp_transport tcp"
FFMPEG_SOURCE="rtsp://192.168.1.123/video.mp4"
FFMPEG_OUTPUT_FLAGS="-r 20 -acodec libspeex"
FFMPEG_OUTPUT_EXT="ogv"
CLIP_LENGTH=600 # seconds
TIMELIMIT=620 # seconds, allows for network timeout over CLIP_LENGTH
KEEP_FILES_FOR=10080 # minutes
View sublime-text.desktop
# ~/.local/share/applications/sublime-text.desktop
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/sublime/sublime_text %U
MimeType=text/plain;
Name=Sublime Text 2
Comment=Sublime Text is a sophisticated text editor for code, html and prose. You'll love the slick user interface and extraordinary features.
View gist:1206035
[
{ "keys": ["ctrl+shift+i"], "command": "insert_snippet", "args": {"contents": "I18n.t($SELECTION)"}, "context":
[
{"key": "scope", "operator": "regex_contains", "operand": "ruby", "match_all": true }
]
}
]