Skip to content

Instantly share code, notes, and snippets.

View yukpiz's full-sized avatar
🐢
|ω・)و ̑̑༉

yukpiz yukpiz

🐢
|ω・)و ̑̑༉
View GitHub Profile
@yukpiz
yukpiz / syntax.vim
Created April 8, 2015 11:42
Get syntax type name of the cursor position.
echo synIDattr(synID(line('.'), col('.'), 0), 'name')
@yukpiz
yukpiz / pg_restore.sh
Created April 9, 2015 02:29
PostgreSQL database restore command.
#!/bin/sh
pg_restore -h {host} -d {database} -U {user} -p {port} backup.dmp
@yukpiz
yukpiz / ball.cpp
Last active August 29, 2015 14:19
"ball" problem code of paiza.
/*
* [Compile]
* g++ -std=c++11 ball.cpp -o ball
*/
#include <vector>
#include <iostream>
using namespace std;
@yukpiz
yukpiz / number.cpp
Created April 13, 2015 11:33
"number" problem code of paiza.
/*
* [Compile]
* g++ -std=c++11 number.cpp -o number
*/
#include <iostream>
#include <vector>
using namespace std;
@yukpiz
yukpiz / price.cpp
Created April 13, 2015 12:15
"price" problem code of paiza.
/*
* [Compile]
* g++ -std=c++11 price.cpp -o price
*/
#include <iostream>
#include <vector>
#include <math.h>
using namespace std;
@yukpiz
yukpiz / tag.cpp
Last active August 29, 2015 14:19
"tag" problem code of paiza.
/*
* [Compile]
* g++ -std=c++11 string.cpp -o string
*/
#include <iostream>
using namespace std;
int main(
@yukpiz
yukpiz / database.py
Created May 8, 2015 08:47
Connection the PostgreSQL for Python.
#-*- encoding: utf-8 -*-
import psycopg2
class PostgreSQL:
connects = {
"host": "host"
"port": "5432",
"dbname": "dbname",
"user": "postgres",
"password": "postgres",

Ubuntu15.04インストールメモ

Conoha APIを試してみるメモ

1. 必要な情報
  • テナントID
  • 各APIごとのエンドポイント
  • APIユーザー名(ConohaアカウントではないAPIアカウント作成時に自動発行されるもの)
  • パスワード
2. トークンの取得
require "squib"
light = "#F3EFE3"
dark = "#230602"
# Squib::Deck.new(cards: 2) do
# background color: "white"
# text str: %w(Hello World!)
# save_png prefix: "basic_"
# end