Skip to content

Instantly share code, notes, and snippets.

@donstefani
donstefani / spotify-axios-basic-auth.js
Created March 8, 2020 22:44
Getting an access token for a React app from the Spotify API using Node.js and Axios
import axios from 'axios';
import qs from 'qs';
export const getAuth = async () => {
const clientId = process.env.REACT_APP_BASIC_CLIENT_ID;
const clientSecret = process.env.REACT_APP_BASIC_CLIENT_SECRET;
const headers = {
headers: {
Accept: 'application/json',
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export function withAppContext<
P extends { appContext?: AppContextInterface },
R = Omit<P, 'appContext'>
>(
Component: React.ComponentClass<P> | React.StatelessComponent<P>
): React.SFC<R> {
return function BoundComponent(props: R) {
return (
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active March 19, 2026 05:51
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

namespace GoogleSpeechToTextLib
{
public class GoogleVoice
{
public static string ACCESS_GOOGLE_SPEECH_KEY = "AIzaSyDC8nM1S0cLpXvRc8TXrDoey-tqQsoBGnM";
public static string TEST_NEW_PATH_2014_PART =
"https://www.google.com/speech-api/v2/recognize?output=json&lang=en-us&key=";
public static string NOT_MY_KEY = "AIzaSyCnl6MRydhw_5fLXIdASxkLJzcJh5iX0M4";
public static String GoogleSpeechRequest(String flacName, int sampleRate)