全自動クラウド会計ソフトfreeeの開発者向けAPIのドキュメントです。
本APIを利用することで、あなたのアプリやサービスをfreeeと連携させることができます。
################################################################################### | |
# check process aliving (count process number) | |
# return integer 1 (process is running) or 0 (process is dead) or 9 (some error) | |
################################################################################### | |
function is_process_alive() { | |
count=`ps awux | grep -v grep | grep -v "$0" | grep -w "$1" | wc -l` | |
if [[ $count =~ ^[0-9]+$ ]]; then | |
if [ $count != 0 ]; then | |
echo 1 | |
else |
CREATE DATABASE IF NOT EXISTS test_db; | |
CREATE TABLE IF NOT EXISTS test_db.users ( | |
id INT AUTO_INCREMENT, | |
name VARCHAR(255) NOT NULL, | |
age INT NOT NULL, | |
sex TINYINT NOT NULL DEFAULT 0, | |
PRIMARY KEY (id) | |
); |
require 'droplet_kit' | |
# get access token from https://www.digitalocean.com/community/tutorials/how-to-use-the-digitalocean-api-v2 | |
# export DIGITAL_OCEAN_TOKEN=XXXXXXXXXXXX | |
client = DropletKit::Client.new(access_token: ENV['DIGITAL_OCEAN_TOKEN']) | |
client.droplets.all().map do |i| | |
i.networks.each do |network| | |
if network&.first&.ip_address | |
puts "#{network&.first&.ip_address}" | |
end |
require 'openssl' | |
require 'droplet_kit' | |
PREFIX = 'prefix-' | |
CLIENT_COUNT = 50 | |
digest = OpenSSL::Digest.new("sha256") | |
# get application token from https://www.digitalocean.com/community/tutorials/how-to-use-the-digitalocean-api-v2 | |
# export DIGITAL_OCEAN_TOKEN=XXXXXXXX | |
client = DropletKit::Client.new(access_token: ENV['DIGITAL_OCEAN_TOKEN']) |
require 'openssl' | |
require 'droplet_kit' | |
CLIENT_COUNT = 20 | |
digest = OpenSSL::Digest.new("sha256") | |
# get digital ocean token from | |
# https://www.digitalocean.com/community/tutorials/how-to-use-the-digitalocean-api-v2 | |
# export DIGITAL_OCEAN_TOKEN=XXXXXXXXXXXXXX | |
client = DropletKit::Client.new(access_token: ENV['DIGITAL_OCEAN_TOKEN']) |
set shell=/bin/sh | |
set guifont=Andale\ Mono:h20 | |
set clipboard=unnamed | |
set number | |
set nocompatible | |
set wildmenu | |
set autoread | |
set wrapscan |
set shell=/bin/sh | |
set guifont=Andale\ Mono:h20 | |
set clipboard=unnamed | |
set number | |
set nocompatible | |
set wildmenu | |
set autoread | |
set wrapscan |
require 'benchmark' | |
n = 10000000 | |
Benchmark.bm do |x| | |
x.report ('to_sym') { n.times do ; 'test'.to_sym end } | |
x.report ('to_s') { n.times do ; :test.to_s end } | |
end |
The query was made on https://bigquery.cloud.google.com/table/fh-bigquery:hackernews.comments for fun and profits :D
The source is at the bottom of this page.
You can read the comments on Hacker News.
You can follow me on Twitter twitter.com/bydorian (I try to keep the quality of my tweets high).
I'm currently looking for an internship involving the most beautiful language in the world (Ruby obviously) in San Francisco.