This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RAW_STATUS=$(python3 ~/src/starlink-grpc-tools/dish_grpc_text.py -s 2 status) | |
STARLINK_CONNECTED=$(echo "$RAW_STATUS" | cut -f 5 -d',') | |
if [[ "${STARLINK_CONNECTED}" == "CONNECTED" ]]; then | |
STARLINK_CONNECTED='${color green}'"CONNECTED"'${color}' | |
elif [[ "${STARLINK_CONNECTED}" == "OFFLINE" ]]; then | |
STARLINK_CONNECTED='${color red}'"OFFLINE"'${color}' | |
else | |
STARLINK_CONNECTED='${color yellow}'"${STARLINK_CONNECTED}"'${color}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE accounts( | |
id serial PRIMARY KEY, | |
name VARCHAR(256) NOT NULL | |
); | |
CREATE TABLE entries( | |
id serial PRIMARY KEY, | |
description VARCHAR(1024) NOT NULL, | |
amount NUMERIC(20, 2) NOT NULL CHECK (amount > 0.0), | |
-- Every entry is a credit to one account... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adityas-MacBook-Air% rake vm:symfony:rebuild ~/code/ted/ted.com | |
Pseudo-terminal will not be allocated because stdin is not a terminal. | |
PHP Warning: require_once(/vagrant): failed to open stream: No such file or directory in /vagrant/config/ProjectConfiguration.class.php on line 2 | |
PHP Stack trace: | |
PHP 1. {main}() /vagrant/symfony:0 | |
PHP 2. require_once() /vagrant/symfony:13 | |
PHP Fatal error: require_once(): Failed opening required '' (include_path='.:/usr/share/pear:/usr/share/php') in /vagrant/config/ProjectConfiguration.class.php on line 2 | |
PHP Stack trace: | |
PHP 1. {main}() /vagrant/symfony:0 | |
PHP 2. require_once() /vagrant/symfony:13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00:09 < stitch> tweetalkie: someone else can answer your question. you have | |
clearly demonstrated you are in no position to write code as | |
you don't even know the basic steps to take when things go wrong | |
00:10 < stitch> tweetalkie: good luck in life |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13:45 -!- ferric [~adityacha@static-64-61-84-78.isp.broadviewnet.net] has | |
joined #flora | |
13:45 -!- ServerMode/#flora [+ns] by anthony.freenode.net | |
13:45 [Users #flora] | |
13:45 [@ferric] | |
13:45 -!- Irssi: #flora: Total of 1 nicks [1 ops, 0 halfops, 0 voices, 0 normal] | |
13:45 -!- Channel #flora created Mon Feb 8 13:45:54 2010 | |
13:45 -!- Irssi: Join to #flora was synced in 0 secs | |
13:45 -!- ServerMode/#flora [-o ferric] by services. | |
13:45 !anthony.freenode.net *** Notice -- TS for #flora changed from 1265654754 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def freeze_time(*times) | |
if times.empty? | |
times << Time.at(Time.now.to_i) # Truncate seconds | |
end | |
Time.stubs(:now).returns(*times) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s = "mutable" | |
arr = [s] | |
hsh = { arr => "object" } | |
s.upcase! | |
p hsh[arr] # -> nil (maybe not what was expected) | |
hsh.rehash | |
p hsh[arr] # -> "object" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Host Database | |
# | |
# localhost is used to configure the loopback interface | |
# when the system is booting. Do not change this entry. | |
## | |
127.0.0.1 groupped groupped.localhost | |
127.0.0.1 localhost subdomain1.localhost subdomain2.localhost www.localhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> class Foo | |
>> def bar=(a = nil, b = nil) | |
>> @bar = "#{a}#{b}" | |
>> end | |
>> end | |
=> nil | |
>> f = Foo.new | |
=> #<Foo:0x5f3390> | |
>> f.bar = 5,10 | |
=> [5, 10] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.load_paths += Dir["#{RAILS_ROOT}/vendor/gems/**"].map do |dir| | |
File.directory?(lib = "#{dir}/lib") ? lib : dir | |
end |
NewerOlder