Skip to content

Instantly share code, notes, and snippets.

dheerajbhaskar /
Created Oct 31, 2015 — forked from jaydeepw/
Enabling HTML5 AppCache in Android Webview programatically.
private void enableHTML5AppCache() {
// Set cache size to 8 mb by default. should be more than enough
// This next one is crazy. It's the DEFAULT location for your app's cache
// But it didn't work for me without this line
webView.getSettings().setAppCachePath("/data/data/"+ getPackageName() +"/cache");
akashrajguru /
Created Jan 24, 2018 — forked from zhy0/
Install Android SDK on headless Ubuntu linux machine via command line, so that you can compile open source Android apps.
# Thanks to
# Execute this script in your home directory. Lines 17 and 21 will prompt you for a y/n
# Install Oracle JDK 8
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install -y oracle-java8-installer
apt-get install -y unzip make # NDK stuff
NickClark / thoughts.markdown
Last active Sep 11, 2018
Elm vs TypeScript Thoughts
View thoughts.markdown

Elm and TypeScript

  • Elm Task - An Elm specific implementation of Observables (more limited?)
  • TS and Elm - Once it compiles it usually runs (Provided you're following the warnings provided in either the compiler output (better) or editor (best) )
  • Editor and tooling support?
  • TS and Elm - Typed Langs
  • Most suitable for complete apps, not just a JS compiler
  • Enforces Reactive programming - Angular 2 (Observables) provides the same thing, just not forced.
  • Know TS, know JS. Able to contribute back to the community easier.
  • Object assignment kinda weird: { point | x = 42 } Reason? (overall weird sytnax)
edc / clone-youtube-playlist.js
Last active Sep 21, 2018
Add a whole Youtube playlist to watch later - so you can clone the list easily
View clone-youtube-playlist.js
// this script copies a youtube playlist to the "watch later" list, so you can easily clone the
// list by creating a new one off the watch later list. You must run this on a playlist overview
// page like
// this script is meant to be converted into a bookmarklet, using something like
// after conversion, it becomes this:
// javascript:(function()%7Bvar%20buttons%20%3D%20document.querySelectorAll(%22button.addto-watch-later-button%22)%3Bvar%20videos%20%3D%20document.querySelectorAll(%22.playlist-video-item%22)%3Bif%20(videos.length%20!%3D%20buttons.length)%20%7Balert(%22Some%20videos%20are%20already%20in%20watch%20later!%20Found%20%22%20%2B%20videos.length%20%2B%20%22%20videos%20but%20%22%20%2B%20buttons.length%20%2B%20%22%20buttons.%20Abort%20now.%22)%3B%7D%20else%20%7Bif%20(confirm(%22Add%20%22%20%2B%20buttons.length%20%2B%20%22%20videos%3F%22))%20%7Bvar%20dialog%20%3D%20document.createElement(%22h1%22)%3Bdialog.innerHTML%20%3D
cben /
Created Sep 10, 2015
The problem with CloudFlare's DNS "CNAME flattening" TTL

[attaching this to a CloudFlare survey why I left them (for DNSimple)]

I was a free user using CloudFlare only for DNS, chiefly because it can simulate CNAME at an apex domain. The apex domains, point to Cloudflare "CNAME-flattening" nicely returns an A record; unfortunately it's served with a huge TTL of 7 days(!), which causes a long outage when the underlying IP changes.

I asked support how I can lower the TTL (BTW it's great that you provide free support at all) and was told [, emphasis mine]:

This is based on the TTL of your authoritative provider for

cheeaun /
Last active Oct 18, 2019
JavaScript error logging services
canton7 /
Created Jan 6, 2012
Workflows for long-running feature branches

Workflows for long-running feature branches

These examples were created during a discussion with j416 on #github about how best to manage long-running feature branches.

The scenario is this: You have a long-running feature branch, based off master. The feature branch and master both touch the same parts of the same files, so you know that there will be conflicts when you finally merge the feature branch in. What can you do to minimise the conflicts?

anonymous / Sublime Text 3
Created May 17, 2016
Sublime Text 3 Licenses
View Sublime Text 3

from @AlexanderPilipenko

Michael Barnes
Single User License
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
TTTIPS / Accelerated_Scrolling.ahk
Last active Aug 16, 2020
Taran's Premiere Mods!
View Accelerated_Scrolling.ahk
; Accelerated Scrolling
; V1.3
; By BoffinbraiN
; His .exe was SKETCHY so here is just the bare .ahk code.
; This is by far the most useful script of them all. It works PERFECTLY, 100% of the time, and is useful in ALL applications.

First of all, this is not my brilliant effort to get react-native working on Windows, it is the collation of work by others, particularly @mqli and @Bernd Wessels. I've just summarised what worked for me.

If you would prefer to read what I've plagerised, head over to mqli's great gist


  • The below is tested with react-native-cli 0.1.5, react-native 0.12.0 on Windows 10, node 4.1.1, and Android (physical Nexus 6 and AVD with API v22)
  • I hope this will all be redundant in a few weeks. Please comment on stuff that is now fixed and I will update this to keep it relevant.
  • Sprinkle a bit of YMMV around

Keep this github issue handy, it’s the bucket for all Windows/Linux related tricks to get RN working.