Skip to content

Instantly share code, notes, and snippets.

View thiagomoretto's full-sized avatar

Thiago Moretto thiagomoretto

View GitHub Profile
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@JacobNinja
JacobNinja / pipeline.clj
Last active April 6, 2022 09:14
Clojure core.async pipeline example
(require '[clojure.core.async :as async]
'[clj-http.client :as client]
'[clojure.data.json :as json])
(def concurrency 5)
(let [in (async/chan)
out (async/chan)
request-handler (fn [url out*]
(async/go
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active November 14, 2024 15:40
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@NoobsArePeople2
NoobsArePeople2 / gist:5121597
Last active September 5, 2024 04:27
Configure media keys on a non-Apple keyboard to control Spotify via AppleScript and USB Overdrive on OSX.

Requirements

  1. USB Overdrive
  2. A non-Apple keyboard with media keys (or keys you want to make "media" keys). For reference, I'm using a Microsoft Sidewinder X4

Set Up

  1. Plug in your keyboard and install USB Overdrive.
  2. Open USB Overdrive. Click into the Settings tab.
  3. Click the dropdown and select "Any Keyboard, Any Application"
@emersonmoretto
emersonmoretto / blender_export_to_vertex
Created February 29, 2012 17:38
Blender python script to generate 3D model by vertex
import os
# Output file
file = open(os.path.expanduser("~/Desktop/model3d.mdl"), "w")
model_object = None
model_mesh = None
# Search for the first object of type mesh
for obj in bpy.context.scene.objects:
@ryangomba
ryangomba / optics.py
Last active May 6, 2024 07:19
OPTICS clustering in Python
# Copyright (c) 2012, Ryan Gomba
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
@chrishulbert
chrishulbert / progressbar.m
Created August 22, 2011 10:18
Progress bar in your navigation bar
// Display a progressbar
- (void)progress:(int)progress withMessage:(NSString*)message {
UIView* v = [[[UIView alloc] init] autorelease];
v.frame = CGRectMake(0, 0, 200, 30);
v.backgroundColor = [UIColor clearColor];
UILabel* lbl = [[[UILabel alloc] init] autorelease];
lbl.frame = CGRectMake(0,0, 200, 15);
lbl.backgroundColor = [UIColor clearColor];
lbl.textColor = [UIColor whiteColor];