sudo apt update
sudo apt install software-properties-common -y
https://thedefiant.io/feed/ | |
https://www.coindesk.com/arc/outboundfeeds/rss/?outputType=xml | |
https://cointelegraph.com/rss | |
https://cryptopotato.com/feed/ | |
https://cryptoslate.com/feed/ | |
https://cryptonews.com/news/feed/ | |
https://smartliquidity.info/feed/ | |
https://finance.yahoo.com/news/rssindex | |
https://www.cnbc.com/id/10000664/device/rss/rss.html | |
https://time.com/nextadvisor/feed/ |
#!/usr/bin/env python | |
"""Extract the public key from the private key and write to a file. | |
""" | |
from Crypto.Hash import SHA256 | |
from Crypto.Signature import PKCS1_v1_5 | |
from Crypto.PublicKey import RSA | |
with open("private_key.pem", "r") as src: | |
private_key = RSA.importKey(src.read()) |
<?php | |
// For more details see: http://laraget.com/blog/implementing-infinite-scroll-pagination-using-laravel-and-jscroll | |
namespace App\Http\Controllers\InfiniteScrolling; | |
use App\Comment; | |
use Illuminate\Http\Request; | |
use App\Http\Requests; | |
use App\Http\Controllers\Controller; |
#!/bin/bash | |
### USAGE | |
### | |
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7 | |
### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
### | |
### CLI options Contributed by @janpieper | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch |
# lib/tasks/db.rake | |
namespace :db do | |
desc "Dumps the database to db/APP_NAME.dump" | |
task :dump => :environment do | |
cmd = nil | |
with_config do |app, host, db, user| | |
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump" | |
end | |
puts cmd |
# More robust version to update new or existing counter cache columns in your Rails app. | |
# See: https://gist.github.com/svyatov/4225663 | |
desc 'Update all cache counters' | |
task :update_cache_counters => :environment do | |
models_to_update = {} | |
# or: Rails.application.eager_load! | |
# Dir loads less, so it's faster | |
Dir.glob(Rails.root.join('app/models/**/*')).each { |model| require model if File.file?(model) } |
Bootstrap 3.0 gives you access to the awesome icon set icon set by these dudes but it's not obvious for a Rails newbie like myself to get it all working together nicely
RAILS_ROOT/vendor/assets/stylesheet/bootstrap-glyphicons.css
/dist/fonts
from the Bootstrap 3.0 download to a new folder in your Rails app RAILS_ROOT/vendor/assets/fonts
config.assets.paths << Rails.root.join("vendor","assets", "fonts")
to application.rb
after the line that has class Application < Rails::Application
.bootstrap-glyphicons.css
modify the the `url#!/bin/bash | |
# Pull this file down, make it executable and run it with sudo | |
# wget https://raw.github.com/gist/5487621/build-erlang-r16b.sh | |
# chmod u+x build-erlang-r16b.sh | |
# sudo ./build-erlang-r16b.sh | |
if [ $(id -u) != "0" ]; then | |
echo "You must be the superuser to run this script" >&2 | |
exit 1 | |
fi |