Skip to content

Instantly share code, notes, and snippets.

View hideo54's full-sized avatar

Hideo Yasumoto hideo54

View GitHub Profile
@rcmachado
rcmachado / html5.vim
Created December 15, 2009 10:35
Vim syntax file for HTML 5
" Vim syntax file
" Language: HTML (version 5)
" Maintainer: Rodrigo Machado <rcmachado@gmail.com>
" URL: http://gist.github.com/256840
" Last Change: 2010 Aug 26
" License: Public domain
" (but let me know if you liked it :) )
"
" Note: This file just adds the new tags from HTML 5
" and don't replace default html.vim syntax file
@rosylilly
rosylilly / gist:3401612
Created August 20, 2012 06:40
先輩と覚える HTTP ステータスコード

先輩に学ぶ HTTP Status Code

超雑にまとめました。修正してください。

登場人物

  • アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
  • 後輩: 頼んでばっかしで役に立たない。
  • サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
  • プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
@nobonobo
nobonobo / recognizer.py
Last active March 10, 2017 17:55
[Google音声認識サンプル] 依存:numpy、PyAudio==0.2.7、flac-1ツール(http://flac.sourceforge.net/download.html
#/usr/bin/env python
# encoding: utf-8
import os
import sys
import atexit
import json
import time
import tempfile
import wave
@amolkhanorkar
amolkhanorkar / PG::Error: ERROR: new encoding (UTF8) is incompatible
Last active November 29, 2023 17:57
Postgres PG::Error: ERROR: new encoding (UTF8) is incompatible
======= Prolbem =================================================================================================================
I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute:
rake db:create , command I get:
PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
: CREATE DATABASE "my_db_name" ENCODING = 'unicode'.......
bin/rake:16:in `load'
@uupaa
uupaa / streaming.nginx.proxy.range.206.md
Last active January 20, 2022 05:49
Unknown 2 byte range request occurred in Chrome for Android and nginx proxy.

現象

Chrome for Android で HLS 再生をしようと playlist.m3u8 をリクエストすると、 Range: bytes=0-1 を含む意図しないリクエストが発生し、2byte のデータ(改行コード)が返る。 その結果 video.js が「サポートしていないファイルだ」として再生を諦めてしまう。

Name Status Type Initiator Size Time ...
<?php
function GetVersion($command, $pattern = '/([\d.]*[\d])/') {
if (preg_match($pattern, shell_exec($command), $matches)) {
return $matches[1];
}
return false;
}
$versions = [
'php' => phpversion(),
@akouryy
akouryy / template.cpp
Last active December 12, 2015 13:21
競プロ用テンプレート(2015/11/23)
// C++ 11
// Library
#include <bits/stdc++.h>
using namespace std;
// Type Name
#define TMPL template<class T>
#define TMPL2 template<class T, class U>
#define TMPL_A template<class T, class ...U>
@gaogao-9
gaogao-9 / mpyw.md
Last active June 1, 2023 03:59
mpyw語録
@matsubara0507
matsubara0507 / introduction2Pwn.md
Last active May 12, 2024 14:14
楽しいPwn入門

たのしいPwn入門

What is This ?

IGGG Advent Calender 2015のために書いた記事です。
常設CTFで遊んでたらPwnable系の問題を解いてるうちにいろいろと勉強になったのでまとめます。

Pwnable

PwnableとはCTFのジャンルの1つで、プログラムの脆弱性をつき、本来アクセスできないメモリ領域にアクセスして操作し、フラグを取得する感じの問題です。
別名としてExploitがあります。

テンプレ略