Skip to content

Instantly share code, notes, and snippets.

ro31337 / gist:fde256c19074356e4f847a48f696658c
Last active Apr 8, 2021
Bulma font-awesome icons for Rails 6
View gist:fde256c19074356e4f847a48f696658c

Единственная запара возникла при подключении иконок к рельс6, решается так (app/javascript/packs/fa.scss)

@import "bulma/bulma";

$fa-font-path: '~@fortawesome/fontawesome-free/webfonts';
@import '~@fortawesome/fontawesome-free/scss/fontawesome';
@import '~@fortawesome/fontawesome-free/scss/solid'; // fas prefix
@import '~@fortawesome/fontawesome-free/scss/brands'; // fab prefix
// see for more prefixes
abohannon / PrivateRoute.js
Created Dec 22, 2017
React/Redux Auth with Private Route Component
View PrivateRoute.js
import React from 'react';
import { Route, Redirect } from 'react-router-dom';
const PrivateRoute = ({ component: Component, authed, }) => (
render={props => (
? <Component {...props} />
: <Redirect to="/login" />
tterb /
Last active Sep 16, 2021
A collection of README badges



MIT License GPLv3 License AGPL License


Version GitHub Release

mrbar42 /
Last active Sep 16, 2021
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)


bash beach.mkv

will produce:

      |- playlist.m3u8
      |- 360p.m3u8
jonyardley / Dockerfile
Last active May 30, 2021
Precompile Ruby on Rails assets with Docker
View Dockerfile
RUN bundle exec rake ASSET_HOST=${ASSET_HOST} RAILS_ENV=production assets:precompile
mtchavez / disk-check.json
Last active Sep 27, 2020
Consul Nagios Example Checks
View disk-check.json
"check": {
"id": "check-disk",
"name": "check-disk",
"script": "/usr/lib/nagios/plugins/check_disk -w 30% -c 5%",
"interval": "1m"
View gist:b206d09c587e8fc6399e

Rails naming conventions

General Ruby conventions

Class names are CamelCase.

Methods and variables are snake_case.

Methods with a ? suffix will return a boolean.

yuki24 / .gitignore
Last active Jul 20, 2020
jbuilder vs ActiveModel::Serializers
View rspec_cheatsheet_controller_spec.rb
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do
kylemcdonald /
Created Sep 21, 2014
Python POST simple server
import SimpleHTTPServer
import SocketServer
PORT = 8000
class ServerHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_POST(self):
content_len = int(self.headers.getheader('content-length', 0))
post_body =