Skip to content

Instantly share code, notes, and snippets.

View justinribeiro's full-sized avatar
✈️
STR: Speaking @ International Conference on Information Systems (ICIS) 2024

Justin Ribeiro justinribeiro

✈️
STR: Speaking @ International Conference on Information Systems (ICIS) 2024
View GitHub Profile

Shortcuts API Specification

This explainer is for the Shortcut API

Introduction

Some platforms like Windows and Android have ways to add menu items to the app launcher icon itself, here after called shortcuts. These can perform certain app actions. On Android in addition, you can drag these shortcuts to the homescreen.

@scottjenson
scottjenson / candy.ino
Created October 19, 2016 17:08
RFDuino arduino sketch to reply to a web bluetooth request
/*
CandyMachine_rfduino.ino
Arduino sketch that turns the vending machine into an Eddystone-URL beacon
and also interfaces with the attached relay shield in order to dispense candy
*/
#include <SPI.h>
#include <EddystoneBeacon.h> // from BLEPeripheral by Sandeep Mistry
@kelleyk
kelleyk / compton.conf
Last active September 19, 2023 12:36
# This is my compton configuration after a quick cleanup. (It's still none too organized; sorry about that.)
# With this file at ~/.config/compton.conf, I can run compton without any arguments (just plain `compton`).
#
# In the hopes that explaining my software and hardware environment might be helpful to you:
#
# I use this configuration on Ubuntu 15.10 (and have used it on previous releases); I am currently using the 352.63 ("long-lived
# branch") NVIDIA binary drivers, installed from the Ubuntu software repositories. I use fluxbox as my window manager; most of
# the other components of my desktop environment are borrowed from Xfce.
#
# My workstation at home has an i7-4930K and a GTX 970 in it, which are together more than enough to drive several 4K displays
#!/bin/bash
set -e
# Send a private message to someone on slack
# from the command line.
# Print a usage message and exit.
usage(){
local name=$(basename "$0")
@paulirish
paulirish / how-to-view-source-of-chrome-extension.md
Last active December 22, 2024 04:42
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@ttaubert
ttaubert / onion-gen.js
Created November 2, 2014 13:14
Generating custom .onion names with the WebCrypto API
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/*
* thirty-two
* https://github.com/chrisumbel/thirty-two
*
@addyosmani
addyosmani / README.md
Last active December 9, 2024 04:12 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@JakeWharton
JakeWharton / AutoGson.java
Last active November 28, 2021 12:32
A Gson TypeAdapterFactory which allows serialization of @autovalue types. Apache 2 licensed.
import com.google.auto.value.AutoValue;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Marks an {@link AutoValue @AutoValue}-annotated type for proper Gson serialization.
* <p>
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active November 28, 2024 10:59
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@gnarf
gnarf / ..git-pr.md
Last active December 6, 2024 10:11
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out