Skip to content

Instantly share code, notes, and snippets.

@oztune
oztune / install react-devtools v3
Created August 23, 2019 23:26
How to install React Dev Tools v3 so that you can have highlight updates again
1. Somewhere on your machine clone the project.
```
> git clone https://github.com/facebook/react-devtools.git
> cd react-devtools
```
2. Switch to the v3 branch
```
> git checkout v3
```
@oztune
oztune / linkpeek.js
Last active December 11, 2015 02:10
Node.js script for generating Link Peek urls
function linkPeek(apiKey, secret) {
return function getUrl(uri, queryParams) {
queryParams = Object.assign({
size: 'original'
}, queryParams)
const token = md5(secret + uri + queryParams.size)
const extraParams = queryParams && Object.keys(queryParams).map(param => `${param}=${encodeURIComponent(queryParams[param])}`).join('&')
return `https://linkpeek.com/api/v1?uri=${encodeURIComponent(uri)}&apikey=${apiKey}&token=${token}${extraParams ? `&${extraParams}` : ''}`
<!DOCTYPE html>
<html>
<body>
<button onclick="play()">Play</button>
<script type="text/javascript">
function play() {
var snd = new Audio("http://work.colum.edu/~nlinscheid/sound-library/flute/Flute-breathy/Flute-breathy-G5.wav");
snd.load();
snd.play();
}
@oztune
oztune / pullall
Created May 31, 2012 18:24 — forked from johnstorm/pullall
Github Pull Everything Script - You must be in the folder that contains all of the projects to be updated, ex: cd C:/Projects/
#!/bin/bash
for file in *
do
if [ -d $file ]
then
cd $file
echo Pulling `pwd` `git branch 2>/dev/null | grep -e '^*' | sed -E 's/^\* (.+)$/(\1) /'`
git pull
cd ../