Skip to content

Instantly share code, notes, and snippets.

View OpenCoderX's full-sized avatar
💭
Open to new projects

OpenCoderX OpenCoderX

💭
Open to new projects
View GitHub Profile
@OpenCoderX
OpenCoderX / flink.service
Created May 13, 2021 13:25 — forked from GEOFBOT/flink.service
systemd file for flink
@OpenCoderX
OpenCoderX / postgres_queries_and_commands.sql
Created December 2, 2020 03:54 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@OpenCoderX
OpenCoderX / Proposal.js
Created December 1, 2017 18:19 — forked from alexvandesande/Proposal.js
Proposal Framework for The DAO
/*
The contract is free software: you can redistribute it and/or modify
it under the terms of the GNU lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The contract is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

README is empty

@OpenCoderX
OpenCoderX / mysql_buffer_pool.sql
Created July 1, 2014 12:54
query to estimate buffer pool
SELECT CEILING(Total_InnoDB_Bytes*1.2/POWER(1024,3)) RIBPS FROM
(SELECT SUM(data_length+index_length) Total_InnoDB_Bytes
FROM information_schema.tables WHERE engine='InnoDB') A;
@OpenCoderX
OpenCoderX / zsh.md
Created March 18, 2014 13:25 — forked from tsabat/zsh.md
require 'mechanize'
URL_FILE = 'qc_urls'
OUTPUT_FILE = 'qc_urls_out'
class QuantcastCrawler
class QuantcastURL
attr_reader :summary
require 'neo4j'
class Show < Neo4j::Rails::Model
property :show_name, type: String, index: :exact
has_n :booked_bands
end
#I have another model, band.rb
class Band < Neo4j::Rails::Model
sudo apt-get install openjdk-6-jre-headless
curl -O http://dist.neo4j.org/neo4j-community-1.5.M02-unix.tar.gz
tar -xf neo4j-community-1.5.M02-unix.tar.gz
rm neo4j-community-1.5.M02-unix.tar.gz
neo4j-community-1.5.M02/bin/neo4j start
# deploy.rb
namespace :ts_remote do
task :conf do
run <<-CMD
cd #{current_release}
&&
RAILS_ENV=#{rails_env} rake ts:conf
&&
rsync --progress #{current_release}/config/#{rails_env}.sphinx.conf sphinxsearch@db-server:/home/sphinxsearch/