Skip to content

Instantly share code, notes, and snippets.

View netoneko's full-sized avatar

Kirill Maksimov netoneko

  • Tel Aviv, Israel
View GitHub Profile
@netoneko
netoneko / gist:861152
Created March 8, 2011 21:48
patch to homebrew #1
$ git show 558d2a4732e594656fe11993259ffc8287eb5c25
commit 558d2a4732e594656fe11993259ffc8287eb5c25
Author: netoneko <[email protected]>
Date: Wed Mar 9 02:29:37 2011 +0500
works with standalone ruby
diff --git a/Library/Homebrew/system_command.rb b/Library/Homebrew/system_command.rb
index cb6e6a8..702521c 100644
--- a/Library/Homebrew/system_command.rb
@netoneko
netoneko / gist:861156
Created March 8, 2011 21:49
patch to homebrew #2
$ git show 5c42999e03cf5043d87f78db7e605467f96824de
commit 5c42999e03cf5043d87f78db7e605467f96824de
Author: netoneko <[email protected]>
Date: Wed Mar 9 02:28:33 2011 +0500
works with standalone ruby
diff --git a/bin/brew b/bin/brew
index 836872a..c96e26a 100755
--- a/bin/brew
@netoneko
netoneko / gist:863003
Created March 9, 2011 21:03
freebsd port of homebrew and bugfix for unintentional altering file permissions for executables
$ git diff ../Library/Homebrew/
diff --git a/Library/Homebrew/cleaner.rb b/Library/Homebrew/cleaner.rb
index 58b1a3b..96f2d1e 100644
--- a/Library/Homebrew/cleaner.rb
+++ b/Library/Homebrew/cleaner.rb
@@ -41,6 +41,9 @@ private
when /Mach-O [^ ]* ?executable/
strip path
perms=0555
+ when /ELF (.*) executable/
@netoneko
netoneko / gist:880176
Created March 21, 2011 20:37
homebrew supports binary packing/unpacking, not fully functional
diff --git a/homebrew/Library/Homebrew/cmd/--config.rb b/Downloads/mxcl-homebrew-4ee43a4/Library/Homebrew/cmd/--config.rb
index 6913f65..13326f1 100644
--- a/homebrew/Library/Homebrew/cmd/--config.rb
+++ b/Downloads/mxcl-homebrew-4ee43a4/Library/Homebrew/cmd/--config.rb
@@ -48,6 +48,7 @@ module Homebrew extend self
HEAD: #{sha}
HOMEBREW_PREFIX: #{HOMEBREW_PREFIX}
HOMEBREW_CELLAR: #{HOMEBREW_CELLAR}
+ HOMEBREW_ARCHIVE: #{HOMEBREW_ARCHIVE}
@netoneko
netoneko / db.rake
Created August 21, 2012 19:55
Model.delete_all rake task
# coding: utf-8
namespace :db do
desc "usage: models=User,Post"
task :delete_all => :environment do
models = ENV['models'].split(',').collect(&:strip).collect(&:constantize)
models.each &:delete_all
end
end
@netoneko
netoneko / gist:5948016
Created July 8, 2013 11:28
Visualisation settings
gource \
-s .06 \
-1280x720 \
--auto-skip-seconds .1 \
--multi-sampling \
--stop-at-end \
--key \
--highlight-users \
--hide mouse,progress,filenames,dirnames \
--file-idle-time 0 \
require 'binding_of_caller'
class Symbol
def ~
this = binding.of_caller(1).eval("self")
this.method(self).to_proc
end
end
def x
(require 'clojure.string)
(def records {})
(def commands {})
(def commands
(assoc commands "add"
(fn [k v] (def records (assoc records k v)))))
(def commands
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update -y
echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
sudo apt-get install -y oracle-java8-installer --quiet
@netoneko
netoneko / response.json
Created March 12, 2020 14:36
service2 response
{
"orchestrator": {
"DynamicManagementConfig": {
"Url": "http:/localhost:7666/node/management",
"ReadInterval": "1m",
"ResetTimeout": "30m"
}
},
"chains": [
{