Skip to content

Instantly share code, notes, and snippets.

Avatar
:shipit:
shipping bits

Samet Gunaydin rokumatsumoto

:shipit:
shipping bits
View GitHub Profile
@rokumatsumoto
rokumatsumoto / 0_Gemfile
Last active May 9, 2020
Stubbing the AWS SDK S3 (bucket.object, bucket.object.exists? methods and bucket.object.exists? responses)
View 0_Gemfile
# Gemfile
gem 'aws-sdk-s3'
@rokumatsumoto
rokumatsumoto / example.rb
Last active Mar 23, 2020 — forked from RobertAudi/example.rb
Custom RSpec matcher for checking class for constant, with optional class type and value
View example.rb
# frozen_string_literal: true
class ExampleClass
POPULAR_LIMIT = 12
end
View download-blob.js
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);
View nginx_websocket.config
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 Oct 22, 2019
simplified download button component for testing purpose
View download_button.vue
<script>
import { mapActions, mapState } from 'vuex';
export default {
name: 'DownloadButton',
props: {
cssClass: {
type: String,
required: true,
},
text: {
View gist:8061386968e885cd69c70c315ca6cf7b
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAYAAAB91L6VAAATU0lEQVR4Xu3VwQkAAAjEMN1/abewn7jAQRC64wgQIECAAIF3gX1fNEiAAAECBAiMAHsCAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICH
@rokumatsumoto
rokumatsumoto / Gemfile
Last active Jun 19, 2020
Configure ActsAsTaggableOn gem (acts-as-taggable-on, acts as taggable on, tagging, tags)
View Gemfile
gem 'acts-as-taggable-on', '~> 6.0'
@rokumatsumoto
rokumatsumoto / clone_https_to_ssh.sh
Created May 9, 2019
Convert HTTPS github clones to use SSH
View clone_https_to_ssh.sh
git remote set-url origin git@github.com:username/repo-name-here.git
@rokumatsumoto
rokumatsumoto / create_swap_space.md
Last active May 5, 2019
Create Swap Space on Ubuntu, Amazon Linux AMI
View create_swap_space.md

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 Feb 25, 2019 — forked from adeekshith/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
View .git-commit-template.txt
# <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
You can’t perform that action at this time.