Skip to content

Instantly share code, notes, and snippets.

@Meartan
Meartan / README.md
Created December 16, 2015 00:54 — forked from JoelBesada/README.md
Backtick Example Command

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.
@jhotmann
jhotmann / GlobalSettings.txt
Created December 9, 2015 17:00
Android Settings
adb_enabled=1
airplane_mode_on=0
airplane_mode_radios=cell,bluetooth,wifi,nfc,wimax
airplane_mode_toggleable_radios=bluetooth,wifi,nfc
assisted_gps_enabled=1
audio_safe_volume_state=1
auto_time=1
auto_time_zone=1
bluetooth_on=1
bugreport_in_power_menu=0
@markushi
markushi / MyActivity.java
Last active May 3, 2020 22:50
Reveal Color View Demo
package at.markushi.reveal;
import android.app.Activity;
import android.graphics.Color;
import android.graphics.Point;
import android.os.Bundle;
import android.view.View;
import at.markushi.ui.RevealColorView;
@caiguanhao
caiguanhao / PrettifyCSS.md
Created March 18, 2014 17:56
Prettify CSS

There are many online tools out there that can prettify or beautify compressed CSS file. But some of them have bugs, for example, not recognizing the @media directive. The easiest way to prettify an online compressed CSS file is to do it in Google Chrome. Open Developer Tools and click Sources tab, select the CSS file and then press the "Pretty Print" button {}.

But there are problems too. Google Chrome does not add the semicolon after the last property or each rule. When you use these styles in LESS, you may get errors if you don't put a semicolon at the end. For example:

@faisalman
faisalman / baseConverter.js
Last active January 11, 2023 14:43
Convert From/To Binary/Decimal/Hexadecimal in JavaScript
/**
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript
* https://gist.github.com/faisalman
*
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
(function(){
@paulirish
paulirish / rAF.js
Last active March 22, 2024 00:00
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];