This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script will download the Adobe Air installer to the | |
# current directory. Just sayin'. | |
# | |
# Instructions from: http://www.zealfortechnology.com/2011/11/install-adobe-air-fedora-16.html | |
echo "-----> Installing dependencies" | |
sudo yum install ld-linux.so.2 gtk2-devel.i686 libdbus-glib-1.so.2 libhal.so.1 rpm-devel.i686 libXt.so.6 gnome-keyring-devel.i686 libDCOP.so.4 libxml2-devel.i686 nss-devel.i686 libxslt.i686 xterm rpm-build libgnome-keyring.i686 | |
echo "-----> Downloading installer" | |
wget --continue http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRInstaller.bin |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Fail fast. | |
set -e | |
# Debug. | |
# set -x | |
function indent() { | |
c='s/^/ /' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "debug.h" | |
debug_stream debug; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.io.run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -ex | |
cd /home/public | |
# Download Wordpress | |
wget http://wordpress.org/latest.tar.gz | |
tar -xf latest.tar.gz | |
rm latest.tar.gz | |
mv wordpress/* . | |
rmdir wordpress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var els = document.querySelectorAll("#browse_result_area [data-bt='{\"ct\":\"title\"}'] a"); | |
var ret = "" | |
for(var i=0; i<els.length; i++) { | |
ret += /\w+ \w+/.exec(els[i].textContent) + ","; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://stackoverflow.com/a/5624139/237285 | |
function rgbToHex(r, g, b) { | |
return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1); | |
} | |
function hexToRgb(hex) { | |
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); | |
return result ? [ | |
parseInt(result[1], 16), | |
parseInt(result[2], 16), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import router from './router.jsx'; | |
import A from './A.jsx'; | |
import B from './B.jsx'; | |
import C from './C.jsx'; | |
router.on('/a', () => { React.render(<A />, document.body); }); | |
router.on('/b', () => { React.render(<B />, document.body); }); | |
router.on('/c', () => { React.render(<C />, document.body); }); | |
router.init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function mapValues<A, B>( | |
obj: { [key: string]: A }, | |
f: (x: A) => B | |
): { [key: string]: B } { | |
const rv: { [key: string]: B } = {} | |
for (const key in obj) { | |
if (obj.hasOwnProperty(key)) { | |
rv[key] = f(obj[key]) | |
} |
OlderNewer