Skip to content

Instantly share code, notes, and snippets.

View carlisia's full-sized avatar
:octocat:
๐ŸŽ‰ โ€ผ๏ธ ๐Ÿ™‹โ€โ™€๏ธ ๐Ÿ˜œ ๐Ÿ‘€ ๐ŸŒŸ ๐ŸŒˆ โ˜€๏ธ ๐Ÿ’ฏ

Carlisia Campos carlisia

:octocat:
๐ŸŽ‰ โ€ผ๏ธ ๐Ÿ™‹โ€โ™€๏ธ ๐Ÿ˜œ ๐Ÿ‘€ ๐ŸŒŸ ๐ŸŒˆ โ˜€๏ธ ๐Ÿ’ฏ
View GitHub Profile
@carlisia
carlisia / gist:340bb8cb51efed61ddc4
Created September 1, 2015 16:54
Resources for becoming a better Ruby/Ruby on Rails Developer
.
@amonks
amonks / docker-notes.md
Created April 8, 2015 23:41
notes from laura frank's presentation on Docker at chicagoruby

docker

layers

  • lxc/libcontainer/ :: execution
  • namespaces :: isolation
  • cgroups :: sharing
  • unionfs :: layering

notes

@Tantas
Tantas / log.go
Last active September 8, 2021 18:22 — forked from cespare/log.go
Apache access logs for golang.
import (
"fmt"
"io"
"net/http"
"strings"
"time"
)
// https://httpd.apache.org/docs/2.2/logs.html#combined + execution time.
const apacheFormatPattern = "%s - - [%s] \"%s %s %s\" %d %d \"%s\" \"%s\" %.4f\n"
@lavalamp
lavalamp / The Three Go Landmines.markdown
Last active February 28, 2025 12:54
Golang landmines

There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.

All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.

  1. Loop variables are scoped outside the loop.

What do these lines do? Make predictions and then scroll down.

func print(pi *int) { fmt.Println(*pi) }
@dhh
dhh / test_induced_design_damage.rb
Last active November 2, 2024 00:52
This is an extraction from Jim Weirich's "Decoupling from Rails" talk, which explained how to apply the hexagonal design pattern to make every layer of your application easily unit testable (without touching the database etc). It only seeks to extract a single method, the EmployeesController#create method, to illustrate the design damage that's โ€ฆ
# Original Rails controller and action
class EmployeesController < ApplicationController
def create
@employee = Employee.new(employee_params)
if @employee.save
redirect_to @employee, notice: "Employee #{@employee.name} created"
else
render :new
end
@lfender6445
lfender6445 / gist:9919357
Last active April 11, 2025 19:56
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

@XVilka
XVilka / TrueColour.md
Last active April 14, 2025 13:32
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@mattetti
mattetti / multipart_upload.go
Last active March 22, 2025 23:09
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"
@ordovician
ordovician / config.fish
Created May 18, 2013 07:02
My configuration file for the fish shell
# Make the blue color for directories more readable
set -x LSCOLORS Exfxcxdxbxegedabagacad
# this is needed to avoid strange python stack backtrace complaining about UTF-8 when
# running sphinx. Found it by googling
set -x LC_ALL en_US.UTF-8
set -x LANG en_US.UTF-8
set -x JULIA_EDITOR textmate
# so our brew install override the commands from the system
@whostolebenfrog
whostolebenfrog / pres.md
Created March 7, 2013 10:20
Notes on: Instantly better presentations - Damian Conway

Instantly better presentations - Damian Conway

It probably just makes more sense to just view his version online at:

http://damian.conway.org/IBP.pdf

But making notes is useful anyway.

7 tips are