This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
How to use this CSS: | |
0. Install the Sidebery extension: https://addons.mozilla.org/en-US/firefox/addon/sidebery/. | |
1. In Sidebery settings: | |
a. Set the title preface must as "[S] " (without quotes). | |
This is used by CSS rules below to identify when Sidebery is active. | |
b. Set 'Tabs tree structure' to false -- this stylesheet doesn't adapt to | |
multiple tab levels, but feel free to tweak it! | |
c. Copy and paste the "SIDEBERY STYLES" section below as a custom |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ForegroundServiceLauncher(private val serviceClass: Class<out Service>) { | |
private var isStarting = false | |
private var shouldStop = false | |
private var isCreated = false | |
@Synchronized | |
fun startService(context: Context, block: Intent.() -> Unit = {}) { | |
if (!isCreated) { | |
isStarting = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Android11 | |
Pair and connect devices for wireless debug on terminal | |
python-zeroconf: A pure python implementation of multicast DNS service discovery | |
https://github.com/jstasiak/python-zeroconf | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"quote": "Life isn’t about getting and having, it’s about giving and being.", | |
"author": "Kevin Kruse" | |
}, | |
{ | |
"quote": "Whatever the mind of man can conceive and believe, it can achieve.", | |
"author": "Napoleon Hill" | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Android and CI and Gradle (A How-To) | |
There are tech stacks in this world that make it dead simple to integrate a <abbr title="Continuous Integration">CI</abbr> build system. <br> | |
The Android platform is not one of them. | |
Although Gradle is getting better, it's still a bit non-deterministic, and some of the fixes you'll need will start to feel more like black magic than any sort of programming. | |
But fear not! It can be done! | |
Before we embark on our journey, you'll need a few things to run locally: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# check for where the latest version of IDEA is installed | |
IDEA=`ls -1d /Applications/Android\ Studio.app | tail -n1` | |
wd=`pwd` | |
# were we given a directory? | |
if [ -d "$1" ]; then | |
# echo "checking for things in the working dir given" | |
wd=`ls -1d "$1" | head -n1` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A module for dependencies which require a {@link android.content.Context} or | |
* {@link android.app.Application} to create. | |
*/ | |
@Module( | |
library = true | |
) | |
public class ContextModule { | |
private Context appContext; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.centralway.numbrs.numbrsapp.views; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.support.design.widget.TextInputLayout; | |
import android.support.v4.view.ViewCompat; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.EditText; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URL: http://beesandbombs.tumblr.com/page/6 | |
void setup(){ | |
size(500,500,P3D); | |
smooth(8); | |
} | |
float f(int i, int j, float q){ | |
return(q*(noise(.2*(i+400-.05*frameCount),.2*(j+90))-.5)); | |
} |
NewerOlder