Skip to content

Instantly share code, notes, and snippets.

View sachin21's full-sized avatar
💭
Feel free to email to me.

Satoshi Ohmori sachin21

💭
Feel free to email to me.
View GitHub Profile
@adeonhy
adeonhy / notify_mining.sh
Created January 3, 2018 17:23
ETHマイニング状況をslackに投げるやつ
ETH_POOL_URL=https://ethermine.org/miners/XXXXXXX
SLACK_CH=XXXXXXX
wget $ETH_POOL_URL -O - 2>/dev/null \
| w3m -dump -cols 2000 -T 'text/html' \
| grep -E 'Unpaid Balance.*ETH' \
| slack-cli -d $SLACK_CH
@shyouhei
shyouhei / gist:266178ffedab5767a5b69b972c76f88a
Created September 27, 2017 07:31
優秀なプログラマーになるためのコツ

優秀なプログラマーになるためのコツ

重要な順で

優秀なプログラマーになるには非常に長い時間がかかるという現実を直視すべし

優秀なプログラマーというのは寝ている間に異世界に召喚されて無双するのとはわけが違うんですよ。

自分の例で言うとプログラミングを始めた中学生の時から優秀なプログラマだったかって、そんなわけない。みんなヘッポコからスタートしているに決まってるわけです。以来二十余年、地道に生き恥を晒し続けてきた結果として、現在いちおう業界の末席を汚すところまで来ている。このプロセスから目を背けるべきではないです。優秀なプログラマーに生まれる人間なんかいない。優秀なプログラマーに「育つ」んだし、それには時間が必要。今日から無双したいと思うな。

問題1. 選択肢の中からRubyの予約語ではないものを2つ選択してください。

  • A.super
  • B.begin
  • C.try
  • D.goto

問題2. 以下のコードを実行した出力として正しいものを1つ選択してください。

def foo (a, *b)
 p a
version: "2"
services:
node:
build:
context: ./
dockerfile: docker/node/Dockerfile
volumes:
- ./client:/app/client
- ./yarn.lock:/app/yarn.lock
- node_modules:/app/node_modules
@wmakley
wmakley / install-ruby-1.8.7.sh
Last active October 7, 2021 09:41 — forked from silviorelli/gist:ad8e1d80bdc0245eb7e7
Install Ruby 1.8.7 on Mac OSX 10.12 Sierra with rbenv
#!/bin/sh
# The main issues with Ruby 1.8.7 are that it won't build with Clang,
# and the Net::HTTPS module won't work with modern versions of OpenSSL.
#
# This assumes you have already set up homebrew, and run: xcode-select --install
brew install homebrew/dupes/apple-gcc42
brew install libyaml libffi
brew install https://github.com/Homebrew/homebrew-versions/raw/586b7e9012a3ed1f9df6c43d0483c65549349289/openssl098.rb
export CC=/usr/local/bin/gcc-4.2
// ==UserScript==
// @name Disable GitHub toolbar hotkey
// @namespace https://wanko.cc
// @include https://github.com/*
// @version 1
// @grant none
// ==/UserScript==
(function() {
var nodes = document.querySelectorAll('.js-toolbar-item[data-toolbar-hotkey]'), i;
for (i = 0; i < nodes.length; i++) {
@joker1007
joker1007 / ginzarb_21.md
Last active April 14, 2021 06:41
Ginza.rb 21回の発表資料。rails_adminのつらみとオススメgem達。

rails_adminのつらみとオススメGemについて

rails_adminのつらみ

カスタマイズできるようで出来ない

レコード件数が一定以上になると使えない機能

  • ダッシュボード
  • 何も考えずに各モデルをカウントするのでレコード件数増えるとえらいことになる。
@cucmberium
cucmberium / gist:e687e88565b6a9ca7039
Last active February 28, 2024 01:23
Twitterの検索API & Twitterでの検索術

twitterの検索術 (search/tweetssearch/universal)

search/tweets では一週間以上前のツイートは検索できないので注意

search/universal は公式のConsumerKey/ConsumerSecretでないと使用できない

当方では一切の責任を負いません

@kjlubick
kjlubick / LICENSE
Last active May 1, 2022 22:26
Exports a THREE.js scene mesh to STL, making it suitable for 3d printing
The MIT License
Copyright © 2010-2016 three.js authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
module RSpec
module Core
class Example
def run_with_retry(example_group_instance, reporter)
@retrying_count = 0
succeeded = run_without_retry(example_group_instance, reporter)
unless succeeded
return finish_without_retry(reporter) unless retry_needed?