Skip to content

Instantly share code, notes, and snippets.

View lae's full-sized avatar

只今立ち去った存在です lae

View GitHub Profile
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import yaml
from datetime import datetime as dt
import json
import re
import collections
import bottle
from bottle import HTTPError, request, response
@lae
lae / minami.py
Created June 22, 2015 06:55
paiza's online hackathon vol 5 (https://paiza.jp/poh/enshura)
# coding: utf-8
# Let's challenge in my favorite language!!
width, height = [int(i) for i in str(input()).split()]
table = [[0 for y in range(height)] for x in range(width)]
for line in range(height):
for i, v in enumerate([int(i) for i in str(input()).split()]):
table[i][line] = v
for col in range(width):

Future updates

Dear backers,

I hope this update finds everyone well. I'd like to take this opportunity to apologise for the very infrequent updates and give you a overview of how Project Phoenix is going.

1. Project Phoenix is alive and kicking

Although not exactly the way I wanted to run this project, our project is alive and it is under development.

@lae
lae / mongrel.rb
Created March 15, 2012 11:56
Mongrel Fix
if ['2.3.8', '2.3.9', '2.3.10', '2.3.11', '2.3.12', '2.3.14'].include?(Rails.version) && Gem.available?('mongrel', Gem::Requirement.new('~>1.1.5')) && self.class.const_defined?(:Mongrel)
# Pulled right from latest rack. Old looked like this in 1.1.0 version.
#
# def [](k)
# super(@names[k] ||= @names[k.downcase])
# end
#
module Rack
module Utils
@lae
lae / clean_vault
Last active December 10, 2015 23:57 — forked from leucos/clean_vault
Ansible vault transparent encryption revisited
#!/bin/bash
# Just print out the secrets file as-is if the password file doesn't exist
if [ ! -r '.vault_password' ]; then
cat
exit
fi
CONTENT="$(cat)"
# Store vault's stderr in RESULT and redirect encrypted stdout back to stdout
{
#!/bin/sh
# Check to see if the directory exists
if [ ! -d $HOME/.ftb ]
then
mkdir $HOME/.ftb
fi
# Check to make sure the launcher is in the directory
if [ ! -f $HOME/.ftb/FTB_Launcher.jar ]
@lae
lae / gist:5232922
Created March 24, 2013 18:21
FTB Ultimate fails to start when the Additional Buildcraft Objects mod is loaded.
AnalyticsBackgroundThread started FTBLaunch starting up (version 1.2.2) Java version: 1.7.0_17 Java vendor: Oracle Corporation Java home: /usr/lib/jvm/java-7-openjdk/jre Java specification: Java Virtual Machine Specification version: 1.7 by Oracle Corporation Java vm: OpenJDK 64-Bit Server VM version: 23.7-b01 by Oracle Corporation OS: amd64 Linux 3.8.4-1-ARCH [i18n] Checking for updates ... [i18n] enUS English language file loaded!
[i18n] remoteVer = 10
[i18n] localVer = 10
[i18n] Files are up to date
[i18n] Fallback enUS loaded
[i18n] Added 0 enUS to options pane
[i18n] Added 1 cyGB to options pane
[i18n] Added 2 frFR to options pane
[i18n] Added 3 ptBR to options pane
[i18n] Added 4 ptPT to options pane

Archvsync

This is the central repository for the Debian mirror scripts. The scripts in this repository are written for the purposes of maintaining a Debian archive mirror (and shortly, a Debian bug mirror), but they should be easily generalizable.

Currently the following scripts are available:

[lae@haruka ~]$ mtr -wc 2 !$
mtr -wc 2 starlight.lae.is
Start: Tue Jun 28 20:13:19 2016
HOST: haruka Loss% Snt Last Avg Best Wrst StDev
1.|-- gateway 0.0% 2 0.6 0.4 0.3 0.6 0.0
2.|-- 192.168.171.1 0.0% 2 0.4 0.5 0.4 0.6 0.0
3.|-- 96.120.89.189 0.0% 2 11.3 10.8 10.4 11.3 0.0
4.|-- te-0-1-0-14-sur03.sanjose.ca.sfba.comcast.net 0.0% 2 13.0 11.1 9.2 13.0 2.6
5.|-- hu-0-18-0-5-ar01.santaclara.ca.sfba.comcast.net 0.0% 2 13.8 13.5 13.2 13.8 0.0
6.|-- be-33651-cr01.sunnyvale.ca.ibone.comcast.net 0.0% 2 15.6 15.5 15.4 15.6 0.0