Skip to content

Instantly share code, notes, and snippets.

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

yukpiz yukpiz

🐢
|ω・)و ̑̑༉
View GitHub Profile
@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
@yukpiz
yukpiz / Rails_note.md
Last active August 29, 2015 14:24
Loading library files for Rails.

Ruby on Railsでライブラリをロードする方法

  • 基本的にRailsアプリケーション内に置いてあるrbファイルはrequireすれば読み込めます。
while true; do date; ls -la; sleep 2; done;