Skip to content

Instantly share code, notes, and snippets.

View rokumatsumoto's full-sized avatar
:shipit:
shipping bits

Samet Gunaydin rokumatsumoto

:shipit:
shipping bits
View GitHub Profile
@rokumatsumoto
rokumatsumoto / keybase.md
Created November 16, 2017 18:38
Keybase proof

Keybase proof

I hereby claim:

  • I am rokumatsumoto on github.
  • I am sametg (https://keybase.io/sametg) on keybase.
  • I have a public key ASAjPyfUH3GPYbtZjMhuDxGseKRf1602hsD8ZwWX_y32Iwo

To claim this, I am signing this object:

@rokumatsumoto
rokumatsumoto / hac.rb
Created December 28, 2018 22:12
hac kura sayfasindaki degisiklikleri takip eder, sesli bildirir. sadece mac os sistemlerde calisir.
require 'nokogiri'
require 'open-uri'
doc = Nokogiri::HTML(open('http://hac.gov.tr/', open_timeout: 100))
File.open("hac.html", "wb") do |f|
f.write(doc.to_html)
end
doc1 = File.open("hac.html") { |f| Nokogiri::HTML(f) }
@rokumatsumoto
rokumatsumoto / postgresql-collate-ctype.sh
Last active January 21, 2019 14:49
postgresql collate and ctype
#!/bin/bash
# `myDB` is your database
# `OWNER = "myself"` is your role (default is your username, or check psql \du)
# tip: when Postgres is installed, it automatically creates a database user that matches your username,
# so that you can get started right away.
locale-gen tr_TR.UTF-8
@rokumatsumoto
rokumatsumoto / restart_bluetooth.sh
Last active January 21, 2019 14:50
Restart Bluetooth Daemon on macOS Sierra without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@rokumatsumoto
rokumatsumoto / hamlit
Last active February 1, 2019 12:55
How to know if you are using hamlit
https://github.com/k0kubun/hamlit/issues/108
In Rails
ActionView::Template.handler_for_extension("haml")
=> #<Hamlit::RailsTemplate:0x005593caad2150>
In Sinatra, or any Tilt environment
Tilt["haml"]
@rokumatsumoto
rokumatsumoto / horizontal-line-with-words.html.haml
Created February 10, 2019 23:06
responsive horizontal line with words by Bootstrap 4.1
.d-flex
%hr.my-auto.flex-grow-1/
.px-4 SOME TEXT HERE
%hr.my-auto.flex-grow-1/
@rokumatsumoto
rokumatsumoto / spec_helper.rb
Created February 23, 2019 10:30
Multiple types of specs in metadata
%i(feature request).each do |type|
config.when_first_matching_example_defined(type: type) do
# enable db support only for feature or request specs
require 'support/db'
end
# include these Helpers only into feature or request specs
config.include(Helpers, type: type)
end
@rokumatsumoto
rokumatsumoto / .git-commit-template.txt
Created February 25, 2019 08:17 — forked from adeekshith/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@rokumatsumoto
rokumatsumoto / create_swap_space.md
Last active May 5, 2019 13:20
Create Swap Space on Ubuntu, Amazon Linux AMI

To check how much available RAM memory you have free:

free -m

To see if you have a swap files:

sudo swapon -s

No swap file shown? Check how much disk space you have:

@rokumatsumoto
rokumatsumoto / clone_https_to_ssh.sh
Created May 9, 2019 12:42
Convert HTTPS github clones to use SSH
git remote set-url origin git@github.com:username/repo-name-here.git