Skip to content

Instantly share code, notes, and snippets.

View sei0o's full-sized avatar

Seio Inoue sei0o

  • The University of Tokyo (eeic2023)
  • Tokyo, Japan (UTC+9)
  • 18:56 (UTC +09:00)
View GitHub Profile
@shoya140
shoya140 / gist:db4e3a1e7860eec4407d
Last active August 29, 2015 14:20
SIFlatButton
//
// SIFlatButton.swift
// TwitterClone
//
// Created by Shoya Ishimaru on 2015/05/08.
// Copyright (c) 2015年 shoya140. All rights reserved.
//
import UIKit
@JasonGiedymin
JasonGiedymin / keygen.coffee
Created April 18, 2012 01:49
Basic KeyGen CoffeeScript
# Basic Keygen
# Briefly used at my startup
# Note: be mindful of any console logging or stdout logging when running this.
#
# By Jason Giedymin
# jasong _-@-_ apache -dot- org
#
crypto = require "crypto"
rbytes = require "rbytes"
@sowawa
sowawa / .recipe
Created April 28, 2012 03:45
Installing rails 4.0.0 beta
thumbnail: http://pds.exblog.jp/pds/1/201101/16/02/d0055302_13383029.jpg
video: http://www.youtube.com/watch?v=UE27t_LJpx0
@nantekkotai
nantekkotai / gist:2841743
Created May 31, 2012 07:55
[iOS]CoreLocationで現在位置を取得する

CoreLocationを使ってGPSやらなにやらで現在位置を特定する。

Frameworkの追加

まずプロジェクトにCoreLocation.frameworkを追加する。

使用するファイルにimport

ここではサンプルとしてDemoViewControllerというものがあるとして、そこで位置取得を行う。

@mamantoha
mamantoha / style.rb
Created August 15, 2012 09:30
sinatra-flash and bootstrap alert
module Sinatra
module Flash
module Style
def styled_flash(key=:flash)
return "" if flash(key).empty?
id = (key == :flash ? "flash" : "flash_#{key}")
close = '<a class="close" data-dismiss="alert" href="#">×</a>'
messages = flash(key).collect {|message| " <div class='alert alert-#{message[0]}'>#{close}\n #{message[1]}</div>\n"}
"<div id='#{id}'>\n" + messages.join + "</div>"
end
@AkashiSN
AkashiSN / ctf_tools.sh
Last active May 31, 2018 06:02
CTF tool installation script.
#!/bin/bash
# Advance preparation
echo "source $HOME/.ctf_tool" >> $HOME/.zshrc
# Support 32-bit elf.
sudo apt install -y lib32z1
# Install other tools.
sudo apt install -y gdb binutils build-essential strace ltrace\
@udzura
udzura / tutorial.md
Created June 2, 2014 03:31
Hubot + CoffeeScript ではじめるやわらかプログラミング入門

やわらかプログラミング入門

  • Hubot であそぼう


始めに、地図を描く

@tetu1225
tetu1225 / app.rb
Created July 18, 2011 06:00
Sinatraで画像ファイルをアップロードして表示する
require 'sinatra'
require 'haml'
# 静的コンテンツ参照のためのパス設定
set :public, File.dirname(__FILE__) + '/public'
# アップロード
get '/' do
haml :index
@itszn
itszn / exploit.html
Last active April 9, 2021 18:31
34c3ctf V9 Exploit
<script>
function gc() { for (let i = 0; i < 0x10; i++) { new ArrayBuffer(0x1000000); } }
var sc = [];
for (var i=0; i<0x480; i++) {
sc.push(0x90);
}
//sc.push(0xcc);
//sc.push(0xeb);
//sc.push(0xfe);
@rkh
rkh / chat.rb
Created December 14, 2011 12:55
Simple Chat Application using the Sinatra Streaming API
# coding: utf-8
require 'sinatra'
set server: 'thin', connections: []
get '/' do
halt erb(:login) unless params[:user]
erb :chat, locals: { user: params[:user].gsub(/\W/, '') }
end
get '/stream', provides: 'text/event-stream' do