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
require 'net/dns/resolver' | |
# Custom Domain | |
# | |
# Require net-dns gem | |
# | |
# A Rack middleware to to resolve the custom domain to original subdomain | |
# for your multi telent application. | |
# | |
# It's all transperant to your application, it performs cname lookup and |
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 for Nginx to act as a front-end for Riak | |
# The main goal is to proxy all GETs directly to Riak, and disallow anything else (POST, PUT, etc) | |
# Also, disallow use of the map/reduce query links (i.e. /riak/bucket/key/_,_,_) | |
# Config is in /etc/nginx/sites-available/default or somewhere like that | |
# Set up load-balancing to send requests to all nodes in the Riak cluster | |
# Replace these IPs/ports with the locations of your Riak nodes | |
upstream riak_hosts { | |
server 127.0.0.1:8098; |
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
// FYI this will currently allow you to only import to the same addr you exported from | |
func (w *Wallet) buildExportTxC2P(srcAddr common.Address, amount uint64, amountPlusFee uint64, nonce uint64) (*evm.UnsignedExportTx, error) { | |
exportTx := &evm.UnsignedExportTx{ | |
NetworkID: w.ChainConfig.NetworkID, | |
BlockchainID: w.ChainConfig.CChainID, | |
DestinationChain: ids.Empty, | |
Ins: []evm.EVMInput{ | |
{ | |
Address: srcAddr, | |
Amount: amountPlusFee, |
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
# widget#custom_css is a string containing CSS or SCSS code | |
def custom_css | |
respond_to do |format| | |
format.css { | |
# I cant believe there isnt a better way to just compile a sass string. Sheesh. | |
sprockets_env = Rails.application.assets | |
opts = sprockets_env.context_class.sass_config | |
ctx = sprockets_env.context_class.new(sprockets_env, "inmemory", Pathname(sprockets_env.root+"/app/assets/stylesheets")) | |
opts = opts.merge( :syntax => :scss, | |
:load_paths => [Rails.root.join("app/assets/stylesheets")], |
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
(base) ❯ cat avm_transactions.json | jq '.[] | select(.memo!="" and .memo!="\u0000\u0000\u0000\u0000") | .memo' | sort | uniq 2.7.1 | |
"0" | |
"03cf4d640442dd05a5" | |
"074e7490ad5656f4d4" | |
"1 Auftrag Binance" | |
"1" | |
"10% Cédric" | |
"10% of 5040 (mainnet day 1 unlock)" | |
"10% of 5353" | |
"10% of 996.11" |
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
### | |
------> HTTPClientWithCache <------ | |
This class is a wrapper around the standard Titanium.Network.HTTPClient(), but it adds a | |
few nice features: | |
* A cache backed by a SQLite database. All HTTPClientWithCache instances use the same database table, with | |
the primary cache key being a hash of the full URL (and any data parameters in a POST) | |
* The cache is automatically pruned before each query | |
* A retry mechanism, so that you can retry a particular query a number of times before failing. |
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
=begin | |
Capistrano deployment email notifier for Rails 3 | |
Do you need to send email notifications after application deployments? | |
Christopher Sexton developed a Simple Capistrano email notifier for rails. You can find details at http://www.codeography.com/2010/03/24/simple-capistrano-email-notifier-for-rails.html. | |
Here is Rails 3 port of the notifier. | |
The notifier sends an email after application deployment has been completed. |
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
## SOLUTION | |
I was able to get past the error by putting this line at the top of config/application.rb | |
require 'fcntl' | |
## | |
torquebox-2.0.0.beta1 | |
$ uname -a | |
Darwin JohnsAir.local 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug 9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64 |
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
const fs = require('fs') | |
const path = require('path') | |
const glob = require('glob-fs')() | |
const moment = require('moment') | |
const matter = require('gray-matter') | |
const processFile = filename => { | |
const fileObj = matter(fs.readFileSync(filename, 'utf8')) | |
const dataObj = { | |
content: fileObj.content, |
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 deps_saved_ddl | |
( | |
deps_id serial primary key, | |
deps_view_schema varchar(255), | |
deps_view_name varchar(255), | |
deps_ddl_to_run text | |
); | |
create or replace function deps_save_and_drop_dependencies(p_view_schema varchar, p_view_name varchar) returns void as | |
$$ |
NewerOlder