I hereby claim:
- I am marcinbunsch on github.
- I am marcinbunsch (https://keybase.io/marcinbunsch) on keybase.
- I have a public key whose fingerprint is 1836 25CF 5835 7135 7C96 B578 7139 5EA3 254C 76F4
To claim this, I am signing this object:
| # AI commit message generator | |
| # | |
| # Assumes LM Studio is running locally and jq is installed | |
| # | |
| # Put this in .zprofile and you can run `aicommit` from any Git repository | |
| aicommit() { | |
| local diff | |
| diff=$(git diff --cached) | |
| if [ -z "$diff" ]; then |
| const express = require("express"); | |
| const app = express(); | |
| const bodyParser = require('body-parser'); | |
| const options = {}; | |
| app.use(bodyParser.json()); // for parsing application/json | |
| app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded | |
| app.post('/groove/ticket/assign', function(req, res) { | |
| console.log(req.body) |
I hereby claim:
To claim this, I am signing this object:
| class Wat | |
| attr_accessor :collaborator, :credentials | |
| def foo(arg) | |
| @collaborator.foo(arg) | |
| rescue | |
| @collaborator.set_auth_credentials(credentials) | |
| @collaborator.foo(arg) | |
| end |
| require "singleton" | |
| class GracefulQuit | |
| include Singleton | |
| attr_accessor :breaker | |
| def initialize | |
| self.breaker = false | |
| end |
| // How to use this: | |
| // 1. Go to the desired profile page on coderwall, like http://coderwall.com/marcinbunsch | |
| // 2. Paste this gist in the JS console | |
| // | |
| // You can also probably use this in greasemonkey and dot.js | |
| // | |
| // Also, it was tested in Chrome, Firefox and Safari, it probably will | |
| // not work in IE, but I just don't care about it ;) | |
| // | |
| // UPDATE: Coderwall made changes to the site and I cannot retrieve the achievements, so they are hardcoded, taken from a cached version of the achievements page |
| class String | |
| def loch_ness_monster_case | |
| self.split('::').collect do |section| | |
| section.gsub(/([^\/])([A-Z])/, '\1_\2').downcase.split(/_/).collect { |part| | |
| chars = part.split('') | |
| half = chars.length/2 | |
| chars[half].upcase! | |
| chars[half - 1].upcase! | |
| chars.join('') |
| class TrueClass | |
| def dat | |
| self | |
| end | |
| end | |
| true.dat # => true |
| # You can use this class in your console. For example | |
| # p = ProfilingTools.new | |
| # p.profiled_request(:controller => :welcome, :action => :index) | |
| # this will profile whole application stack and save file in your tmp/profiler folder | |
| # You can also use +request+ method just to see the output for example: | |
| # | |
| # p.request(:controller => :offers, :action => :index) | |
| # | |
| # p.response.body | |
| # p.response.cookies # and so on |
| #!/usr/bin/ruby | |
| # gem install things-client --source http://gemcutter.org | |
| # gem install broadcast | |
| require 'rubygems' | |
| require 'things' | |
| require 'broadcast' |