Skip to content

Instantly share code, notes, and snippets.

View macbury's full-sized avatar
🍻
🍺.drink! while 🍺.present?

macbury

🍻
🍺.drink! while 🍺.present?
View GitHub Profile
@macbury
macbury / tensorflow_setup.sh
Created February 3, 2019 12:00 — forked from hunterjm/tensorflow_setup.sh
TensorFlow Object Detection Setup (Linux)
# Change this path to your config directory
CONFIG_DIR="/config"
cd /tmp
# Clone the latest code from GitHub
git clone --depth 1 https://github.com/tensorflow/models.git tensorflow-models
# download protobuf 3.4
curl -OL https://github.com/google/protobuf/releases/download/v3.4.0/protoc-3.4.0-linux-x86_64.zip
@macbury
macbury / jenkins-api.md
Created February 15, 2018 08:29 — forked from justlaputa/jenkins-api.md
Jenkins Json API

jobs

jenkins_url + /api/json?tree=jobs[name,color]

builds

jenkins_url + /job/${job_name}/api/json?tree=builds[number,status,timestamp,id,result]

last build

==========================================================================================
resources :brands do
resources :products
end
resources :categories do
resources :products
end
@macbury
macbury / dashboard.html.haml
Created January 25, 2016 13:12
Sidekiq in iframe
%iframe#sidekiq_iframe{ src:"/admin/sidekiq" }
@macbury
macbury / guage.ino
Created June 20, 2014 16:10
Arduino code for stupid guage
#include <SPI.h>
#include <Ethernet.h>
#include <Servo.h>
Servo guageServo;
byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,1,177);
int port = 3000;
@macbury
macbury / server.rb
Created June 20, 2014 16:08
Server code for stupid guage
require 'socket'
maximum_load = 8.0
puts "Starting"
server = TCPServer.new(3000)
puts "Listening"
loop do
client = server.accept
puts "Accepted client"
while true
@macbury
macbury / moped_instrumentation.rb
Created February 18, 2013 13:31
Experimental Moped/Mongoid 3 Instrumentation for Rails 3
module Moped
module Instrumentation
def self.instrument(klass)
klass.class_eval do
def logging(operations)
instrument_start = (logger = Moped.logger) && logger.debug? && Time.new
yield
ensure
instrument_end = 1000 * (Time.new.to_f - instrument_start.to_f)
#include <Servo.h>
#include <Bounce.h>
Servo silnik;
byte LED_R = 9;
byte LED_G = 11;
byte LED_B = 10;
byte SILNIK_PIN = 2;
byte RESET_BUTTON_PIN = 4;
@macbury
macbury / gist:3923003
Created October 20, 2012 11:15
Rails Template 0.1
# create rvmrc file
create_file ".rvmrc", "rvm use ruby-1.9.3-head@#{app_name} --create"
gem 'mysql2', group: :orm
gem "carrierwave", group: :orm
gem "devise", group: :authorization
gem "cancan", group: :authorization
gem "yettings", group: :other