Skip to content

Instantly share code, notes, and snippets.

Avatar
🤠

Daniel Mathews dmathewwws

🤠
View GitHub Profile
@dmathewwws
dmathewwws / google-autocomplete.ipynb
Created Nov 12, 2020 — forked from mariolambe/google-autocomplete.ipynb
Extract Google Autocomplete keywords with Python
View google-autocomplete.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@michaeltys
michaeltys / ShareFileToInstagram
Created Oct 10, 2018
Sharing an image to instagram stories or create a post
View ShareFileToInstagram
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 Jul 10, 2021
Multi-column SectionList using FlatList
View multi-column-section-list-example.md

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

const fruits = [
  {
    name: 'Apple',
    color: 'Green'
  },
  {
    name: 'Banana',
View 0-bridging-react-native-cheatsheet.md
@simme
simme / debounce-throttle.swift
Created Dec 20, 2016
Swift 3 debounce & throttle
View debounce-throttle.swift
//
// debounce-throttle.swift
//
// Created by Simon Ljungberg on 19/12/16.
// License: MIT
//
import Foundation
extension TimeInterval {
@subfuzion
subfuzion / curl.md
Last active Dec 3, 2021
curl POST examples
View curl.md

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 Mar 26, 2018
BubbleTransition with Objective-C
View ViewController.m
// 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 Aug 10, 2021
WWDC Sessions by Topics
View WWDC Sessions by Topics.md

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
Android dialog fragment that allows selection of an item from a list
View ItemPickerDialogFragment.java
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;
@carlo
carlo / google-img-resize.mdown
Last active Oct 8, 2021
Google’s authentication-less on-the-fly image resizing service
View google-img-resize.mdown

Google's authentication-less on-the-fly image resizing service

I found it while poking around the Google+ HTML. Jotting down some notes felt like a good idea, so here goes. If you know more about this API, let me know, please!

(Word of warning: I spent ~30 minutes on both my experimentation and this here write-up, so it might not be the most thought-provoking, brilliant thing you read today.)