Skip to content

Instantly share code, notes, and snippets.

@sebboh
sebboh / gist:f1dfe4f096746c45f3e9ea06a09743a0
Last active April 3, 2025 07:45 — forked from masonforest/gist:4048732
Installing a Gem on Heroku from a Private GitHub Repo

Installing a Gem on Heroku from a Private GitHub Repo

Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.

Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.

This method does not add your OAuth token to Gemfile.lock. It uses bundle config to store your credentials, and allows you to configure Heroku to use environment variables when deploying.

  1. Generate an OAuth token from GitHub
@bondden
bondden / slv.graceful-fs.sh
Last active May 19, 2016 02:07
Temporary fix for graceful-fs related Node.js 5 to 6 update error: (node:14471) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
#!/usr/bin/env bash
# Temporary fix for Node.js 5 to 6 aupdate error:
# (node:14471) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
# Updates any package by package name, version number, if set,
# or graceful-fs to 4.1.3 by default.
# By default runs npm dedupe after applying fixes
#
# Usage: bash ./slv.graceful-fs.sh [MODULE VERSION [noddp]]
# where
@voluntas
voluntas / webrtc.rst
Last active March 28, 2025 06:01
WebRTC コトハジメ
@azu
azu / flux-utils.md
Last active August 8, 2018 17:31
flux-utilsについて
@Fishrock123
Fishrock123 / gulp.js
Last active August 1, 2021 11:19
gulp & browserify (+watchify +babelify)
var gulp = require('gulp')
var browserify = require('browserify')
var watchify = require('watchify')
var babelify = require('babelify')
var source = require('vinyl-source-stream')
var buffer = require('vinyl-buffer')
var merge = require('utils-merge')

ECMAScript6th Quiz

Q.1

let func = function() {};
func.name
  1. ""
  2. "func"
@hashrock
hashrock / vuejs.md
Last active October 5, 2023 23:42
Vue.js資料まとめ(古いので注意)

#まず見るべき

以下のURLは、常に更新されているコンテンツです。

@matsubo
matsubo / credit_card_bin_codes.md
Last active April 25, 2025 16:14
Credit Card Bin Codes

概要

クレジットカード番号には法則があり、先頭6桁でカードの種類を識別、分類することができる。

詳細はISO/IEC 7812で規定されている。

ISO/IEC 7812 - Wikipedia https://ja.wikipedia.org/wiki/ISO/IEC_7812

先頭の6桁を銀行識別番号(Bank Identification Number、略称:BIN)ないしは発行者識別番号(Issuer Identification Number、略称:IIN)と呼び、この先頭6桁でカード発行会社(イシュア、issuer)が判るようになっている。

@lygaret
lygaret / index.js
Last active December 19, 2024 11:26
ES6 Quasi-Literal for JSX
define(function(require) {
var React = require('react');
var paramRegex = /__(\d)+/;
var parser = new DOMParser();
var errorDoc = parser.parseFromString('INVALID', 'text/xml');
var errorNs = errorDoc.getElementsByTagName("parsererror")[0].namespaceURI;
// turns the array of string parts into a DOM
// throws if the result is an invalid XML document.
@killercup
killercup / api.js
Last active June 10, 2021 22:02
Streamed CSV Export using node-restify and mongoose
/**
* # Some Demo API Service
*/
var restify = require('restify');
var map = require('map-stream');
var csvify = require('../helpers/csvify');
var Team = require("../models").Team;