Skip to content

Instantly share code, notes, and snippets.

Gregório Chalinski Kusowski gregoriokusowski

Block or report user

Report or block gregoriokusowski

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View concave-split-planck.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gregoriokusowski
gregoriokusowski / osx.sh
Last active Jun 4, 2019
Those fixes I have to google everytime I don't want to restart the machine to "fix it"
View osx.sh
# Audio in/out
sudo killall coreaudiod
# Camera
sudo killall VDCAssistant
sudo killall AppleCameraAssistant
# Bluetooth
## Unfortunately, I don't know yet how to tackle it from the CLI, but...
Option + Shift + Click on BT button on Status Bar > Debug > Reset the Bluetooth Module
@gregoriokusowski
gregoriokusowski / .block
Created Jul 17, 2016 — forked from mbostock/.block
Heatmap (Canvas, JSON)
View .block
license: gpl-3.0
@gregoriokusowski
gregoriokusowski / Teste.java
Last active Sep 25, 2015
Abtract methods on java enums
View Teste.java
public enum Operacao {
SOMA ("+") {
@Override
Integer executa(Integer a, Integer b) {
return a + b;
}
},
SUBTRACAO ("-") {
@Override
Integer executa(Integer a, Integer b) {
@gregoriokusowski
gregoriokusowski / gist:4634474
Created Jan 25, 2013
Since we started to use a branching model to control every stuff we send to production, we use the interactive rebase into a temp branch in order choose commits, keep their reference and check the code before check it to the stable branch.
View gist:4634474
git checkout master
git checkout -b temp
git rebase -i stable
# Time to select/remove/squash commits
git checkout stable
git pull . temp
git branch -d temp
@gregoriokusowski
gregoriokusowski / Calculadora.java
Created Aug 9, 2012
String Calculator Kata realizado na Prime Systems em POA. 06/09/2011.
View Calculadora.java
package tdd.kata;
public class Calculadora {
public Integer add(String string) {
if (string.equals("")) return 0;
else if(string.equals("1")) return 1;
String delimitador = "[,|\n]";
View Preferences.sublime-settings
{
"auto_match_enabled": true,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme",
"ensure_newline_at_eof_on_save": true,
"font_face": "Monaco",
"font_options":
[
"subpixel_antialias"
@gregoriokusowski
gregoriokusowski / comparer.rb
Created Apr 27, 2012
Script to compare apps. ( Used when creating a engine to avoid duplicate code on two projects. )
View comparer.rb
class Comparer
DEFAULT_CONFIG = {
folders: [:app, :lib],
formats: [:erb, :rb, :js, :css, :coffee]
}
end
class Application
@gregoriokusowski
gregoriokusowski / git_log.rb
Created Feb 13, 2012
Simple release-notes from your git log ('per-week' approach)
View git_log.rb
# usage: (after download this file to your repo folder)
# $ cd git_repo
# $ ruby git_log.rb >> release_notes.txt
require 'time'
class Commit
def rows
@rows ||= []
end
@gregoriokusowski
gregoriokusowski / non_tenant_finder.rb
Created Jan 13, 2012
Checks for all non-tenant models inside an app/models folder. Easy to run via rails console.
View non_tenant_finder.rb
tenant_model_class = TenantModel
%x[ls app/models/].split("\n").each do |w|
begin
model = w[0...-3].camelize.constantize
k = model
while k != Object
if k == ActiveRecord::Base
unless model.include? tenant_model_class
puts model
end
You can’t perform that action at this time.