Skip to content

Instantly share code, notes, and snippets.

😇
Hello

Yoichi Fujimoto wozozo

😇
Hello
Block or report user

Report or block wozozo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View read_csv.php
<?php
$handle = fopen('file.csv', 'r');
while ($a=fgetcsv($handle)) {
$b[] = $a;
}
echo "<table border='1'>";
foreach ($b as $v) {
echo "<tr>";
View convert-less.php
<?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);
}
View gist:bbe64ac2c159ec948cd4
import UIKit
class Controller: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell")
}
View gist:d428b178a4c5e4ce65cc
package main
import (
"fmt"
"time"
)
func main() {
🏃 := make(chan int)
💨 := make(chan int)
View gist:44e9f0956df86ddfd91e
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}/>
View gist:f2140f2f33bf2c3f6e3a
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
error_log(var_export($_SERVER, true));
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
View gist:37512b4cbb347816d179
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 \
View chimpoco.py
# coding: utf-8
import json
import requests
class Chimpo(object):
endpoint = 'http://chimpo.co/shortener/v1'
"""docstring for Chimpoco"""
View init.coffee
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
You can’t perform that action at this time.