Skip to content

Instantly share code, notes, and snippets.

@cowboy
cowboy / gyazo.php
Created October 6, 2009 21:30
PHP upload for Gyazo
<?PHP
/*
* PHP upload for Gyazo - v1.2.1 - 3/13/2011
* http://benalman.com/news/2009/10/gyazo-on-your-own-server/
*
* Copyright (c) 2011 "Cowboy" Ben Alman
* Licensed under the MIT license
* http://benalman.com/about/license/
*/
@gabehesse
gabehesse / StatusBar.cs
Created May 16, 2011 21:59
Status bar in C# console application
/// <summary>
/// Draw a progress bar at the current cursor position.
/// Be careful not to Console.WriteLine or anything whilst using this to show progress!
/// </summary>
/// <param name="progress">The position of the bar</param>
/// <param name="total">The amount it counts</param>
private static void drawTextProgressBar(int progress, int total)
{
//draw empty progress bar
Console.CursorLeft = 0;
@hayajo
hayajo / changelog_en.md
Last active June 27, 2024 02:39
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@tsux89
tsux89 / Twitter Client CK CS
Last active July 30, 2016 10:31
Twitter Client CK/CS
ShootingStar
Consumer key: Eb8hyAEUju1f2g0i2iSwTQ
Consumer secret: lOBgiyGJcYK4jsUc2It38ORlsJC0a60USShZrosMTlw
ShootingStarPro
Consumer key: I8ye5YHbnFUVzrWdyEkXw
Consumer secret: UTXlrSs9IuZuhfxfwBDckzMDHCI8HRlTNtitiV2OL4
@neonichu
neonichu / ingress.py
Last active August 28, 2023 18:02
Demo of accessing the Ingress API.
#!/usr/bin/env python
import cookielib
import json
import mechanize
#####
GOOGLE_USER = 'you@gmail.com'
GOOGLE_PASS = 'your-password'
#####
(๑′ᴗ'๑)プァァァァーーーーン!!!!! (▰˘◡˘▰)。oO( ダメーレチトーン ) ( '◕‿◕)ビチョチョチョチョチョ……
(▰˘◡˘▰)。oO( プネバレチトーン ) ヽ(*゚ω。)ノピロピロピロピロ…… ( ^_^)/□☆□\(^-^ )(タッドドタッド)
(▰˘◡˘▰)ドゥーナバーガアベナチーレチドン ンメスウェドッフローダメラベメサニチ レメテツァマチダンユールネバレチトーン。oO( ( ˘⊖˘)ボボボボボ ( ´◔ ‸◔`)ボンファイア!!! )
(▰˘◡˘▰)ノ゙ッ!!! ドゥーナバーガアベナチーレチドン ンメスウェドッフローダメラベメサニチ レメテツァマチダンユールネバレチトーン。oO( ( ˘⊖˘)ボボボボボ ( ´◔ ‸◔`)ボンファイア!!! )
(*_*)デュー…(チャチャッ チャ) (チャチャッチャ) (*_*)デュー(*_*)デュー…(チャチャッ チャ) (チャチャッチャ)
(*_*)デューデューデケデケデューデューデケデケデューデューデケデケデューデューデケデケ…
(;_;) デッデケデッケデケデケデッデケデッケデケデケデッデケデッケデケデケ!!!
( ˘⊖˘)ボボボボボボボ
_人人人人人人人人人人人人_
> ( ´◔ ‸◔`)ボンファイヤ!!! <
#!/usr/local/bin/ruby
# -*- coding: utf-8 -*-
#
#This script gets LINE Stickers.(for iPhone)
# http://shutingrz.hatenablog.com/entry/2014/08/13/042413
#
# gem install cfpropertylist
#
require 'json'
#!/bin/bash -x
# Description:L2TP/IPsec for CentOS7 64bit
# 2015/05/09 @mix3
(
## setting
cat << _SECRETS_ > /tmp/SECRETS_TMP.txt
#==============================================
# username auth_server password auth_ipaddress
@DanielSWolf
DanielSWolf / Program.cs
Last active June 13, 2024 17:26
Console progress bar. Code is under the MIT License: http://opensource.org/licenses/MIT
using System;
using System.Threading;
static class Program {
static void Main() {
Console.Write("Performing some task... ");
using (var progress = new ProgressBar()) {
for (int i = 0; i <= 100; i++) {
progress.Report((double) i / 100);
@dck-jp
dck-jp / temp.cs.bat
Last active August 2, 2016 16:20
Execute C# code directly on Windows by double-clicking the source file
@echo off
SET OutputCs="TempCs.cs"
SET OutputExe="TempCs.exe"
if exist %OutputCs% goto ExecuteCs
del %OutputCs%
for /f "usebackq skip=20 delims=|" %%i in (%0) do (echo %%i>>%OutputCs%)
:ExecuteCs
pushd %~dp0
FOR /F "TOKENS=1,2,*" %%I IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework" /v "InstallRoot"') DO IF "%%I"=="InstallRoot" SET FrameworkPath=%%K
SET PATH="%PATH%;%FrameworkPath%v4.0.30319\;%FrameworkPath%v3.5;%FrameworkPath%v3.0;"