- emerge app-shells/bash-completion
- $ find /usr -name git-prompt.sh.bz2
/usr/share/doc/git-1.8.5.5/git-prompt.sh.bz2 3. cp /usr/share/doc/git-1.8.5.5/git-prompt.sh.bz2 ~ 4. bunzip2 git-prompt.sh.bz2 5. mv git-prompt.sh .git-prompt.sh
| var R = require('ramda'); | |
| void 0; //to not bloat the output | |
| var random = require('seed-random')(1337); | |
| var data = [ | |
| {input: [0, 0], output: 0}, | |
| {input: [1, 0], output: 1}, | |
| {input: [0, 1], output: 1}, | |
| {input: [1, 1], output: 0}, | |
| ]; | |
| var activation_sigmoid = x => 1 / (1 + Math.exp(-x)); |
| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| geoip2 "github.com/oschwald/geoip2-golang" | |
| "log" | |
| "net" | |
| "os" | |
| "regexp" |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <errno.h> | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> | |
| #include <arpa/inet.h> | |
| #include <byteswap.h> | |
| #include <maxminddb.h> | |
| #define STR_MAX 256 |
| messages = Message.arel_table | |
| messages2 = Message.arel_table.alias('messages2') | |
| messages3 = Message.arel_table.alias('messages3') | |
| users = User.arel_table | |
| manager = Arel::SelectManager.new(Message.arel_engine) | |
| manager.project users[:first_name], users[:last_name], messages[:created_at] | |
| manager.from messages | |
| manager.join(messages2, Arel::Nodes::OuterJoin).on(messages[:created_at].eq(messages2[:created_at])) | |
| manager.join(messages3, Arel::Nodes::OuterJoin).on(messages[:recipient_id].eq(messages3[:recipient_id])) | |
| manager.join(users).on(users[:id].eq(messages[:sender_id])) |
| #!/bin/bash | |
| INTERVAL="1" # update interval in seconds | |
| if [ -z "$1" ]; then | |
| echo | |
| echo usage: $0 [network-interface] | |
| echo | |
| echo e.g. $0 eth0 | |
| echo |
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
| ; ___ _ __ ___ __ ___ | |
| ; / __|_ _ __ _| |_____ / /| __|/ \_ ) | |
| ; \__ \ ' \/ _` | / / -_) _ \__ \ () / / | |
| ; |___/_||_\__,_|_\_\___\___/___/\__/___| | |
| ; An annotated version of the snake example from Nick Morgan's 6502 assembly tutorial | |
| ; on http://skilldrick.github.io/easy6502/ that I created as an exercise for myself | |
| ; to learn a little bit about assembly. I **think** I understood everything, but I may | |
| ; also be completely wrong :-) |
| class SomeORM | |
| def self.attributes(*names) | |
| if const_defined?(:DynamicAttributes, false) | |
| mod = const_get(:DynamicAttributes) | |
| else | |
| mod = const_set(:DynamicAttributes, Module.new) | |
| include mod | |
| end | |
| mod.module_eval do | |
| names.each do |name| |
| is_weekday = lambda {|day_of_week, time| time.wday == day_of_week}.curry | |
| sunday = is_weekday[0] | |
| monday = is_weekday[1] | |
| tuesday = is_weekday[2] | |
| wednesday = is_weekday[3] | |
| thursday = is_weekday[4] | |
| friday = is_weekday[5] | |
| saturday = is_weekday[6] |