Skip to content

Instantly share code, notes, and snippets.

View ekkis's full-sized avatar

Erick Calder ekkis

  • Arix Int'l
  • LalaLand
View GitHub Profile
@ekkis
ekkis / configure.sh
Last active April 26, 2019 09:05
Capital Hero setup scripts
PASS="$(node -e 'console.log(crypto.randomBytes(16).toString("hex"))')"
echo $PASS > .pass
echo "Password saved to .pass"
run() {
cmd="$@"
[ ! -z "$DEBUG" ] && echo "$cmd"
[ -z "NOEXEC" ] && $cmd
}
sql() {

Keybase proof

I hereby claim:

  • I am ekkis on github.
  • I am ekkis (https://keybase.io/ekkis) on keybase.
  • I have a public key ASCLtGsr9sS4tNmvMm6TI6bRH4-fRlj5mlzVj9M6_8Rk_wo

To claim this, I am signing this object:

glass f000
music f001
search f002
envelope-o f003
heart f004
star f005
star-o f006
user f007
film f008
th-large f009
@ekkis
ekkis / ColourNamesCodes.csv
Last active October 16, 2015 20:38
Colour Name/Codes
AliceBlue F0F8FF
AntiqueWhite FAEBD7
Aqua 00FFFF
Aquamarine 7FFFD4
Azure F0FFFF
Beige F5F5DC
Bisque FFE4C4
Black 000000
BlanchedAlmond FFEBCD
Blue 0000FF
@ekkis
ekkis / cypher.js
Created August 24, 2015 19:12
Provides JQuery functionality to retrieve data from the Neo4j server
var neo = {
url: 'http://localhost:7474',
user: 'neo4j',
password: 'nopass',
};
function cypher(query, success) {
query = { statements: [
{statement: query, resultDataContents: ["graph","row"]}
]};
@ekkis
ekkis / svnrepo-layout-flip
Created June 16, 2015 21:07
Converts a CVS repository to Subversion, changing the layout
#!/usr/bin/perl
#
# svnrepo-layout-flip
# Copyright (C) 2009 Erick Calder
# All rights reserved.
#
# - Synopsis -
# the utility cvs2svn can convert an entire
# CVS repository to Subversion, but its choice
@ekkis
ekkis / domain-check
Created June 16, 2015 21:05
Checks a list of domains or e-mail addresses
#!/usr/bin/perl
use Socket;
$\ = $/;
$debug = 1;
@d = @ARGV;
unless (@d) {
print "Enter a list of domains or e-mail addresses to be checked, one per line:";
chomp(@d = <>);
@ekkis
ekkis / string.js
Created June 16, 2015 20:35
Javascript string prototypes
String.prototype.format = function() {
var ret = this;
for (var i = 0; i < arguments.length; i++) {
var rex = RegExp("\\{" + i + "\\}", "g");
ret = ret.replace(rex, arguments[i]);
}
return ret;
}
String.prototype.q = function() {
@ekkis
ekkis / sp_rebuild_indexes.sql
Created June 16, 2015 19:08
Rebuilds all indexes on a list of tables provided
use master
go
/*
** - synopsis -
** Rebuilds all indexes on a list of tables provided
**
** - syntax -
** @ls: an XML object of the format <tables><table>{table name}</table>...</tables>
** @tbpat: a pattern applied to table names containing SQL wild characters that adds
** to the list provided via @ls
@ekkis
ekkis / VMs.sql
Created June 16, 2015 18:54
Functionality for VM analysis
/*
create table #counts (name sysname, n int)
go
declare @s varchar(max)
select @s = isnull(@s, '') + ' insert #counts select ''' + name + ''', count(*) from ' + name from sys.tables
exec(@s)
select * from #counts where n >= 16 order by 2
select * from vpx_object_type
select * from vpx_feature
select * from vpx_sequence order by id