Skip to content

Instantly share code, notes, and snippets.

View wozozo's full-sized avatar
😇
Hello

Yoichi Fujimoto wozozo

😇
Hello
  • Tokyo, Japan
  • 21:31 (UTC +09:00)
  • X @wozozo
View GitHub Profile
<?php
$handle = fopen('file.csv', 'r');
while ($a=fgetcsv($handle)) {
$b[] = $a;
}
echo "<table border='1'>";
foreach ($b as $v) {
echo "<tr>";
<?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);
}
import UIKit
class Controller: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell")
}
package main
import (
"fmt"
"time"
)
func main() {
🏃 := make(chan int)
💨 := make(chan int)
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}/>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
error_log(var_export($_SERVER, true));
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
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 \
# coding: utf-8
import json
import requests
class Chimpo(object):
endpoint = 'http://chimpo.co/shortener/v1'
"""docstring for Chimpoco"""
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
convert -geometry 128x128 in.png out.png