Skip to content

Instantly share code, notes, and snippets.

View terrcin's full-sized avatar

terrcin terrcin

View GitHub Profile
@cblavier
cblavier / appsignal_telemetry.ex
Last active April 14, 2022 01:27
A Phoenix Telemetry agent to monitor all LiveView events & errors
defmodule AppSignalTelemetry do
use GenServer
require Appsignal.Utils
import Appsignal.Utils, only: [module_name: 1]
@tracer Appsignal.Utils.compile_env(:appsignal, :appsignal_tracer, Appsignal.Tracer)
@span Appsignal.Utils.compile_env(:appsignal, :appsignal_span, Appsignal.Span)
@appsignal_namespace "live_view"
def start_link do
@steveh
steveh / crontab.sh
Created July 13, 2017 00:09
PRS price to Influxdb
* * * * * /home/steve/power/price | /home/steve/power/write

A better git branch

I'll often use branches to try out experiments, ideas, and to separate different trains of thought. Not every branch gets merged – in fact, it's quite common for me to make several commits on a branch, look at the end result, and throw the branch away without ever merging it (branching is cheap and ideas are cheap, but bad code is expensive). As a result, I can end up with a lot of branches. This makes the output of git branch difficult to sort through:

$ git branch
* account-org-association
  acdx-blog-posts
  add-static-resource-support
  alter-component-naming
@tedpennings
tedpennings / routes.md
Last active April 6, 2020 18:28
A year of travel!

I spent six months traveling around the world with my partner Jen. It was one of the most fulfilling and exciting things I've ever done.

This document lists my route, December 2016 to May 2017.

Current status

I'm back in Portland, Oregon! I am so thankful for the opportunity to have spent six months traveling around the world while working remotely. It was one of the most fulfilling experiences of my life. I am back in Portland to stay and excited to call it home. I'm looking forward to re-establishing my yoga practice and getting in skydives toward by B license.

During my travels, I was able to visit thirteen countries: New Zealand, Australia, Indonesia, Taiwan, Malaysia, Thailand, India, Singapore, the United Arab Emirates, Egypt, Morocco, Spain and Canada. All but the last two were new experiences for me. Working while traveling permitted me to stay longer to get a feel for the local culture, and also gave me a feel for local life by requiring me to find wifi and cafes to work.

@twosixcode
twosixcode / gist:1988097
Created March 6, 2012 18:40
Make "Paste and Indent" the default paste in Sublime Text 2
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
@funny-falcon
funny-falcon / patch-1.9.2-gc.patch
Created March 5, 2011 11:11
GC tunning simple patch ruby 1.9.2 p180
diff --git a/gc.c b/gc.c
--- a/gc.c
+++ b/gc.c
@@ -77,6 +77,41 @@ void *alloca ();
#ifndef GC_MALLOC_LIMIT
#define GC_MALLOC_LIMIT 8000000
#endif
+#define HEAP_MIN_SLOTS 10000
+#define FREE_MIN 4096
+
@bebraw
bebraw / gameengines.md
Created January 6, 2011 18:07
List of JS game engines. You can find a wikified version at https://github.com/bebraw/jswiki/wiki/Game-Engines. Feel free to modify that. I sync it here every once in a while.

IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version. There's also a "notes" column in the table but it simply does not fit there... Check out the raw version to see it.

This table contains primarily HTML5 based game engines and frameworks. You might also want to check out the [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]] and [[Scene Graphs]].

Name Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
AllBinary Platform Platform Dependent AllBinary 2D/2.5D/3D n
.mouse, #preview{
position: absolute;
background-repeat: no-repeat;
height: 22px;
min-width: 15px;
z-index: 100;
}
.mouse{
background-image: url('../images/cursor.png');