Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / gs_sp_to_txt.sh
Created June 30, 2012 13:16
Google Speech to Text script
arecord -D plughw:1,0 -f cd -t wav -d 3 -r 16000 | flac - -f --best --sample-rate 16000 -o out.flac; wget -O - -o /dev/null --post-file out.flac --header="Content-Type: audio/x-flac; rate=16000" http://www.google.com/speech-api/v1/recognize?lang=en | sed -e 's/[{}]/''/g'| awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]; exit }' | awk -F: 'NR==3 { print $3; exit }'
@adamgreig
adamgreig / email_away_highlights.py
Created December 14, 2012 02:20
Weechat script to send an email when a new highlight or privmsg is received while away. NB only checks away status of the first server.
# -*- coding: utf-8 -*-
# Copyright 2012 Adam Greig <adam@adamgreig.com>
#
# email_away_highlights.py
# Email highlights received while away.
SCRIPT_NAME = "email_away_highlights"
SCRIPT_AUTHOR = "Adam Greig <adam@adamgreig.com>"
SCRIPT_VERSION = "1.0"
SCRIPT_LICENSE = "GPL3"
That’s one of the real strengths of Docker: the ability to go back to a previous commit. The secret is simply to docker tag the image you want.
Here’s an example. In this example, I first installed ping, then committed, then installed curl, and committed that. Then I rolled back the image to contain only ping:
$ docker history imagename
IMAGE CREATED CREATED BY SIZE
f770fc671f11 12 seconds ago apt-get install -y curl 21.3 MB
28445c70c2b3 39 seconds ago apt-get install ping 11.57 MB
8dbd9e392a96 7 months ago 131.5 MB
@NoraCodes
NoraCodes / SCFAonLinux.md
Last active April 4, 2024 13:26
Supreme Commander: Forged Alliance with Steam on Linux with PlayOnLinux

This guide is out of date. Use https://github.com/FAForever/faf-linux instead.

Install PlayOnLinux with your package manager (i.e. sudo apt-get install playonlinux). Then, type playonlinux and wait for it to refresh its list.

Install Steam under PlayOnLinux. Once Steam is running, exit it, select its entry in PlayOnLinux, and select Configure.

I suggest using Wine 1.7.8-d3d doublebuffer

Now go to the "Install Components" section and install, in any order: d3dx9, directx9, dotnet40

@Lifree
Lifree / Overview.md
Last active August 29, 2015 14:22
GroupShoppingPlanner
@shilman
shilman / storybook-docs-typescript-walkthrough.md
Last active May 28, 2024 17:42
Storybook Docs Typescript Walkthrough

Storybook Docs w/ CRA & TypeScript

This is a quick-and-dirty walkthrough to set up a fresh project with Storybook Docs, Create React App, and TypeScript. If you're looking for a tutorial, please see Design Systems for Developers, which goes into much more depth but does not use Typescript.

The purpose of this walkthrough is a streamlined Typescript / Docs setup that works out of the box, since there are countless permutations and variables which can influence docs features, such as source code display, docgen, and props tables.

Step 1: Initialize CRA w/ TS

npx create-react-app cra-ts --template typescript