Skip to content

Instantly share code, notes, and snippets.

View acro5piano's full-sized avatar
🏠
Working from home

Kay Gosho acro5piano

🏠
Working from home
View GitHub Profile
@branneman
branneman / better-nodejs-require-paths.md
Last active April 27, 2024 04:16
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@emmaly
emmaly / gist:8267078
Created January 5, 2014 11:21
Bash script to automatically switch PulseAudio sink to Bluetooth headset on connect with A2DP profile and 50% volume.
#!/bin/bash
sink_name="bluez_sink.00_42_1B_AD_FA_CE"
if [ -z "$1" ]; then
dbus-monitor --system "path=/org/bluez/777/hci0/dev_00_42_1B_AD_FA_CE, interface=org.bluez.AudioSink, member=Connected" | while read line; do
echo $line
$0 1
done
else
@msurguy
msurguy / List.md
Last active April 30, 2024 15:14
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@benlesh
benlesh / BinaryTree.js
Created February 21, 2014 03:41
A simple Binary Tree implementation in JavaScript
/**
* Binary Tree
* (c) 2014 Ben Lesh <ben@benlesh.com>
* MIT license
*/
/*
* A simple Binary Tree implementation in JavaScript
*/
@uupaa
uupaa / ts.md
Last active June 5, 2018 08:34
TypeScript を vim に導入して Syntax Highlight する
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@goldeneggg
goldeneggg / docker_md.md
Last active November 26, 2017 08:08
Dockerについての調査まとめ、基本機能+主な特徴+Vagrantの連携 あたり

Dockerについて調べたのでヅラヅラとまとめ + チートシート

概念とか用語とか、とりあえず押さえとくべきもの

  • lxc
    • LXC - Wikipedia
    • OSレベル の仮想化ソフトウェア
      • 完全仮想化(ハードウェアをエミュレート、オーバーヘッド大) - KVM etc
      • 準仮想化(ゲストOSがホストOSのAPIを使用、オーバーヘッド中) - Xen, Hyper-V etc。Virtualboxもこちらか
  • 仮想機械ではなく、個別のプロセスとネットワークスペースを作り出す仮想環境
@lirenlin
lirenlin / gist:9892945
Last active April 21, 2024 17:27
i3 wm, hide window title bar
@lfender6445
lfender6445 / gist:9919357
Last active May 12, 2024 19:09
Pry Cheat Sheet

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@yasushiyy
yasushiyy / vagrant_coreos_docker.md
Last active January 28, 2019 11:35
Vagrant + CoreOS + Dockerを利用した開発環境セットアップ

Vagrant + CoreOS + Dockerを利用した開発環境セットアップ

MacOSX + Vagrant + CoreOS + Docker + Ubuntuの環境。

2014年6月11日時点での情報。

  • Version: CoreOS 343.0.0
  • Kernel: 3.14.5
  • Docker: 1.0