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 / 0_Gemfile
Last active September 14, 2023 22:00
Stubbing the AWS SDK S3 (bucket.object, bucket.object.exists? methods and bucket.object.exists? responses)
# Gemfile
gem 'aws-sdk-s3'
@rokumatsumoto
rokumatsumoto / example.rb
Last active April 14, 2022 19:49 — forked from RobertAudi/example.rb
Custom RSpec matcher for checking class for constant, with optional class type and value
# frozen_string_literal: true
class ExampleClass
POPULAR_LIMIT = 12
end
@rokumatsumoto
rokumatsumoto / download-blob.js
Created December 28, 2019 12:23
download blob
let URLObj = window.URL || window.webkitURL;
let a = document.createElement("a");
a.href = URLObj.createObjectURL(blob);
a.download = "untitled.jpg";
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
files:
/etc/nginx/conf.d/proxy.conf:
content: |
client_max_body_size 500M;
server_names_hash_bucket_size 128;
upstream backend {
server unix:///var/run/puma/my_app.sock;
}
@rokumatsumoto
rokumatsumoto / download_button.vue
Last active October 22, 2019 10:54
simplified download button component for testing purpose
<script>
import { mapActions, mapState } from 'vuex';
export default {
name: 'DownloadButton',
props: {
cssClass: {
type: String,
required: true,
},
text: {
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAYAAAB91L6VAAATU0lEQVR4Xu3VwQkAAAjEMN1/abewn7jAQRC64wgQIECAAIF3gX1fNEiAAAECBAiMAHsCAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICH
@rokumatsumoto
rokumatsumoto / Gemfile
Last active June 19, 2020 19:49
Configure ActsAsTaggableOn gem (acts-as-taggable-on, acts as taggable on, tagging, tags)
gem 'acts-as-taggable-on', '~> 6.0'
@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
@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 / .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