Skip to content

Instantly share code, notes, and snippets.

@yosukehasumi
yosukehasumi / readme.md
Last active October 22, 2021 15:12
DigitalOcean Rails/Ubuntu/NGINX (16.04) Setup

DigitalOcean Rails/Ubuntu/NGINX (16.04) Setup

  1. Setup
  2. Swapfile
  3. NGINX
  4. ElasticSearch
  5. RVM
  6. Rails
  7. Postgres
  8. Capistrano
@alexkrolick
alexkrolick / webpack.config.js
Last active July 13, 2017 04:11
Webpack Config for Webpack-Rails + CDN for production (Webpack 1.x - some minor differences may be encountered for Webpack 2+)
const CDN = process.env['CDN_HOST'] || '';
/**
* Webpack configuration for integrating Webpack with Rails via the webpack-rails gem
* (https://github.com/mipearson/webpack-rails)
*
* Cache-Busting Strategy:
* Development: Change query string of resource when content MD5 hash changes,
* rewriting the asset in place but triggering rewrite of the manifest.
* Production: Use MD5 hash of asset as filename, writing new assets and manifest
@leonardofed
leonardofed / README.md
Last active July 5, 2024 01:31
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@vasanthk
vasanthk / System Design.md
Last active July 4, 2024 15:09
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@wesbos
wesbos / tab-trigger.js
Created November 16, 2015 19:33
How to properly get a TAB trigger working with Emmet inside of JSX
{
"keys": ["tab"],
"command": "expand_abbreviation_by_tab",
// put comma-separated syntax selectors for which
// you want to expandEmmet abbreviations into "operand" key
// instead of SCOPE_SELECTOR.
// Examples: source.js, text.html - source
"context": [
{
@bivainis
bivainis / sanfrancisco-font.css
Last active May 26, 2024 20:01
San Francisco Web Font
/**
* http://applemusic.tumblr.com/
*/
/** Ultra Light */
@font-face {
font-family: "San Francisco";
font-weight: 100;
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-ultralight-webfont.woff2");
}
@soffes
soffes / SpaceView-iOS.swift
Last active June 29, 2017 19:11
Handy utility view when working with UIStackView
import UIKit
/// Space view intented to be used with auto layout.
/// Similar to UIStackView, setting a background color is not supported.
final class SpaceView: UIView {
// MARK: - Properties
private let contentSize: CGSize
@imkevinxu
imkevinxu / Device.swift
Last active March 4, 2023 16:09
iOS device checks for OS version and screen size in Swift
//
// Device.swift
// imHome
//
// Created by Kevin Xu on 2/9/15. Updated on 6/20/15.
// Copyright (c) 2015 Alpha Labs, Inc. All rights reserved.
//
import Foundation
@nathansmith
nathansmith / bootstrap-grid-3.3.1.css
Last active October 4, 2021 08:43
Bootstrap's grid, in isolation. Normalize.css removed.
/*
Bootstrap v3.3.1 (http://getbootstrap.com)
*/
/*
NOTE:
This file has Normalize.css removed.
It still requires a "reset.css", so we're using this...
@indragiek
indragiek / RandomNumbers.swift
Last active November 26, 2015 16:26
Random number generator in Swift
public struct RandomNumberGenerator: SequenceType {
let range: Range<Int>
let count: Int
public init(range: Range<Int>, count: Int) {
self.range = range
self.count = count
}
public func generate() -> GeneratorOf<Int> {