Skip to content

Instantly share code, notes, and snippets.

View lookfirst's full-sized avatar
💭
25 years of paving open source roads

Public Profile lookfirst

💭
25 years of paving open source roads
View GitHub Profile
@tobert
tobert / jmxtrans-hadoop-namenode.json
Created September 6, 2011 00:11
JMXTrans config for Hadoop Namenodes & Graphite
{
"servers" : [
{
"port" : "NAMENODE_JMX_PORT",
"host" : "NAMENODE",
"numQueryThreads" : 8,
"queries" : [
{
"outputWriters" : [
{
@AndreaLanfranchi
AndreaLanfranchi / bootnodes
Created February 17, 2020 17:55
Ethash-ProgPoW 0.9.3.
enode://8889269a8059832b6f25f3ef7f04e0aff25f0776d92e542a60f96b42f7bfb2616fcb98c842202ebba171c02bf429e3813192ab04c0ad741b22860184994ea748@3.126.167.52:30303
@millermedeiros
millermedeiros / index.html
Created September 3, 2011 16:20
Example of how to use a single JS file for multiple pages of an application
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example</title>
<meta name="description" content="This is just an example">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/main.css">
</head>
<body data-modules="foobar, lorem/ipsum">
@zombiezen
zombiezen / readctx.go
Last active November 30, 2020 06:01
Reading while respecting Context.Done
// ctxReader adds timeouts and cancellation to a reader.
type ctxReader struct {
r io.Reader
ctx context.Context // set to change Context
// internal state
result chan readResult
pos, n int
err error
buf [1024]byte
@jonhoo
jonhoo / README.md
Last active July 19, 2021 10:49
Distributed RWMutex in Go
@njvitto
njvitto / deploy.rake
Created April 11, 2010 16:56 — forked from RSpace/deploy.rake
Rakefile to deploy and rollback to Heroku in two different environments (staging and production) for the same app
#Deploy and rollback on Heroku in staging and production
task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
namespace :deploy do
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU'
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU'
task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag]
task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on]
@Yavari
Yavari / README.markdown
Created February 23, 2012 09:00 — forked from gudbergur/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string
@balupton
balupton / README.md
Last active April 20, 2022 13:21
Ajaxify a Website with the HTML5 History API using History.js, jQuery and ScrollTo
@andreif
andreif / podman_macos.md
Created April 13, 2022 06:17 — forked from kaaquist/podman_macos.md
Podman with docker-compose on MacOS.

Podman with docker-compose on MacOS.

Podman an alternative to Docker Desktop on MacOS

Getting podman installed and started is super easy.
Just use brew to install it.

> brew install podman

Now since podman uses a VM just like the Docker Client on MacOS we need to initialize that and start it.

@claviska
claviska / pretty-buttons.less
Last active October 21, 2022 22:25
A Less mixin' for pretty buttons with Bootstrap 3
.pretty-buttons(@color, @background, @text-shadow: none) {
color: @color;
#gradient > .vertical(lighten(@background, 5%), darken(@background, 5%), 0%, 100%);
border-color: darken(@background, 10%);
border-bottom-color: darken(@background, 20%);
text-shadow: @text-shadow;
.box-shadow(inset 0 1px 0 rgba(255, 255, 255, .1));
&:hover,