Skip to content

Instantly share code, notes, and snippets.

View dmathewwws's full-sized avatar
🤠

Daniel Mathews dmathewwws

🤠
View GitHub Profile
@dmathewwws
dmathewwws / google-autocomplete.ipynb
Created November 12, 2020 03:41 — forked from mariolambe/google-autocomplete.ipynb
Extract Google Autocomplete keywords with Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mattlockyer
mattlockyer / jwt.js
Created November 2, 2019 04:01
JWT Token Module for Cloudflare Workers / Browser
/********************************
* Module for generating and verifying JWT tokens
* Designed to work on Cloudflare Workers
* Should work in the browser or any env that supports Web Crypto API
********************************/
/********************************
* Key secret is a random Uint8Array of length 64
* See below for instructions on generating random values / keys
********************************/
@michaeltys
michaeltys / ShareFileToInstagram
Created October 10, 2018 15:13
Sharing an image to instagram stories or create a post
private void shareFileToInstagram(Uri uri, boolean isVideo, Post post) {
Intent feedIntent = new Intent(Intent.ACTION_SEND);
feedIntent.setType(isVideo ? "video/*" : "image/*");
feedIntent.putExtra(Intent.EXTRA_STREAM, uri);
feedIntent.setPackage(Constants.INSTAGRAM_PACKAGE_NAME);
Intent storiesIntent = new Intent("com.instagram.share.ADD_TO_STORY");
storiesIntent.setDataAndType(uri, isVideo ? "mp4" : "jpg");
storiesIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
storiesIntent.setPackage(Constants.INSTAGRAM_PACKAGE_NAME);
@robinheinze
robinheinze / multi-column-section-list-example.md
Last active March 14, 2024 15:09
Multi-column SectionList using FlatList

First, let's assemble the data. Say we have two sets of objects: Fruits and Vegetables.

const fruits = [
  {
    name: 'Apple',
    color: 'Green'
  },
  {
    name: 'Banana',
@chourobin
chourobin / 0-bridging-react-native-cheatsheet.md
Last active April 11, 2024 15:02
React Native Bridging Cheatsheet
@simme
simme / debounce-throttle.swift
Created December 20, 2016 10:04
Swift 3 debounce & throttle
//
// debounce-throttle.swift
//
// Created by Simon Ljungberg on 19/12/16.
// License: MIT
//
import Foundation
extension TimeInterval {
@subfuzion
subfuzion / curl.md
Last active April 23, 2024 14:44
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@andreamazz
andreamazz / ViewController.m
Last active March 26, 2018 07:29
BubbleTransition with Objective-C
// BubbleTransition imported as a pod with Cocoapods:
//
// pod 'BubbleTransition'
// use_frameworks!
//
#import "ViewController.h"
@import BubbleTransition;
@interface ViewController () <UIViewControllerTransitioningDelegate>
@devonc
devonc / WWDC Sessions by Topics.md
Last active March 6, 2022 10:48
WWDC Sessions by Topics

WWDC Sessions by Topics

Language and Runtime

  • WWDC 2012 Session 405 — Modern Objective-C
  • WWDC 2012 Session 413 — Migration to Modern Objective-C
  • WWDC 2013 Session 228 — Hidden Gems in Cocoa and Cocoa Touch
  • WWDC 2014 Session 402 — Introduction to Swift
  • WWDC 2014 Session 403 — Intermediate Swift
  • WWDC 2014 Session 404 — Advanced Swift
@kristopherjohnson
kristopherjohnson / ItemPickerDialogFragment.java
Last active May 7, 2018 06:42
Android dialog fragment that allows selection of an item from a list
package net.kristopherjohnson;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;