Skip to content

Instantly share code, notes, and snippets.

annalee /
Last active Mar 22, 2021
A sample code of conduct for social slack teams.

[SLACKNAME] Code of Conduct



The current admins are:

  • [NAMES]
ericclemmons /
Last active May 7, 2021
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

 <summary>Summary Goes Here</summary>
glarrain /
Last active Mar 26, 2021 — forked from jonyt/connect_heroku_to_amazon_rds
How to connect a Heroku application to an Amazon RDS PostgreSQL instance, forcing SSL and certificate chain verification

1 - Download the RDS certificates (root plus region-specific intermediate ones) bundle:

wget -O config/rds-combined-ca-bundle.pem

2 - Add config/rds-combined-ca-bundle.pem to the repository and redeploy to Heroku.

3 - Update the DATABASE_URL env var:

ramiroaznar / index.html
Last active May 6, 2017
How to add a formula, histogram & category widget to a dashboard using deepinsights.js
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>Deep-Insights.js | Highest Mountains</title>
<link rel="shortcut icon" href="" />
<meta name=viewport content="width=device-width initial-scale=1">
<link rel="stylesheet" href="" />
<script src=""></script>
<style type="text/css">
# usage:
# I've been using this ffmpeg command to take recordings made with ecamm's Call Recorder for Skype and uploading them
# to YouTube for transcription. I found that YouTube would only transcribe one of the audio channels which
# was often my own voice, which made it less than useful, to put it mildly. Once the channels are combined YouTube will
# transcribe both sides of the conversation. I also found that it was useful to adjust the volumes of the tracks.
ffmpeg -i $1 -filter_complex "[0:a:0]volume=0.781250[a1];[0:a:1]volume=0.781250[a2]; [a1][a2]amerge[out]" -map 0:v -map "[out]" -c:v copy -shortest $2
arfon /
Last active May 2, 2021
BigQuery Examples for blog post

How many times shouldn't it happen...


SELECT count(*)
FROM (SELECT id, repo_name, path
        FROM [bigquery-public-data:github_repos.sample_files]
      ) AS F
lopspower /
Last active May 18, 2021
Hexadecimal color code for transparency

Hexadecimal color code for transparency


How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

121onto / 20160307172445_change_paperclip_attachment_path.rb
Created Mar 7, 2016
Example migration for changing paperclip storage path
View 20160307172445_change_paperclip_attachment_path.rb
class MoveAttachmentsToNewLocation < ActiveRecord::Migration
def initialize(name =, version = nil)
access_key = Rails.application.secrets.g3_access_key_id
secret_key = Rails.application.secrets.g3_secret_access_key
storage = google_storage_access_key_id: access_key,
google_storage_secret_access_key: secret_key
@bucket_name = Rails.application.secrets.g3_bucket
@bucket = storage.directories.get(@bucket_name)
super(name, version)
jarednorman / webpack-rails-1.markdown
Last active May 13, 2020
Webpack with Rails Part 1
View webpack-rails-1.markdown

Webpack with Rails Part 1

I don't like Sprockets, but it's the easiest and best choice for lots of Ruby on Rails projects. When looking for a better way to manage my JavaScript assets and an improved developer story, my current tool of choice is webpack. While I wish Rails supported drop-in asset pipelines the way that Phoenix does, it's not hard to use webpack with Rails.

View Intercom

Intercom user_hash

Remember that your secret key should never be exposed to the public

  • So Javascript code below should only be used for testing unless modified and used to run on a server