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
<?php | |
$handle = fopen('file.csv', 'r'); | |
while ($a=fgetcsv($handle)) { | |
$b[] = $a; | |
} | |
echo "<table border='1'>"; | |
foreach ($b as $v) { | |
echo "<tr>"; |
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
<?php | |
$filename = isset($argv[1]) ? realpath($argv[1]) : null; | |
$mixin = isset($argv[2]) ? $argv[2] : 'sprite-mixin'; | |
$retina = isset($argv[3]) ? true : false; | |
if (!$filename) { | |
echo "fail", PHP_EOL; | |
exit(1); | |
} |
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 UIKit | |
class Controller: UITableViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
self.tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell") | |
} | |
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
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
🏃 := make(chan int) | |
💨 := make(chan int) |
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
render() { | |
const { id, label, inputs } = this.props; | |
return ( | |
<div> | |
this.props.inputs.values.map((value) => { | |
let defaultChecked = (value == inputs.defaultCheckedValue); | |
return ( | |
<label className="radio-inline"> | |
<input type="radio" ref={id + value} name={id} value={value} defaultChecked={defaultChecked}/> |
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
<?php | |
if ($_SERVER['REQUEST_METHOD'] == 'POST') { | |
error_log(var_export($_SERVER, true)); | |
exit; | |
} | |
?> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> |
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
FROM python:3.4.3-onbuild | |
RUN echo "mysql-server mysql-server/root_password password root" | debconf-set-selections && \ | |
echo "mysql-server mysql-server/root_password_again password root" | debconf-set-selections && \ | |
apt-get update && apt-get install -q -y \ | |
mysql-client libmysqlclient-dev \ | |
postgresql-client libpq-dev \ | |
sqlite3 \ | |
gcc \ | |
mysql-server \ |
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
# coding: utf-8 | |
import json | |
import requests | |
class Chimpo(object): | |
endpoint = 'http://chimpo.co/shortener/v1' | |
"""docstring for Chimpoco""" |
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
fs = require('fs') | |
# Import ENV from zsh config. | |
fs.readFile process.env.HOME+"/.zshrc", "utf8", (err, zshFile) -> | |
envPaths = ['/usr/local/bin'] | |
for l in zshFile.split('\n') | |
if l.substring(0,11) is 'export PATH' | |
e = l.split('=').splice(-1)[0] | |
e = e.replace(':$PATH','').replace(/"/g,'') | |
if ':' in e |
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
convert -geometry 128x128 in.png out.png |
OlderNewer