This file contains hidden or 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
# frozen_string_literal: true | |
MAX_COLUMNS_FOR_TABLE = 15 unless defined?(MAX_COLUMNS_FOR_TABLE) | |
DEFAULT_EDITOR = 'code' unless defined?(DEFAULT_EDITOR) | |
class PrettyString < String | |
# https://no-color.org/ | |
NO_COLOR = ENV.key?('NO_COLOR') || `tput colors`.chomp.to_i < 8 unless defined?(NO_COLOR) | |
unless defined?(ANSI_COLORS) | |
ANSI_COLORS = { | |
red: 31, |
This file contains hidden or 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 'irb/completion' | |
require 'irb/ext/save-history' | |
require 'rubygems' | |
require 'irb/easter-egg' if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('2.7.0') | |
%w[awesome_print rainbow interative_editor virb].each do |gem| | |
next if Gem.loaded_specs.key?(gem) | |
if defined?(::Bundler) | |
system("rvm @global do gem install #{gem}") | |
global_gemset = ENV['GEM_PATH'].split(':').grep(/ruby.*@global/).first |
This file contains hidden or 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
SELECT | |
t.TABLE_SCHEMA, | |
t.TABLE_NAME, | |
c.COLUMN_NAME, | |
IFNULL( | |
kcu.CONSTRAINT_NAME, 'Not indexed' | |
) AS `Index` | |
FROM | |
information_schema.TABLES t | |
INNER JOIN information_schema.`COLUMNS` c ON c.TABLE_SCHEMA = t.TABLE_SCHEMA |
This file contains hidden or 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/sh | |
# start a neo4j docker container with apoc and bloom (server variant) configured | |
# this requires to have | |
# * curl, unzip and jq being installed | |
# * having a valid bloom license file | |
# released under the WTFPL (http://www.wtfpl.net/) | |
# (c) Stefan Armbruster |
This file contains hidden or 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
#------------------ | |
# Shell Variables | |
#------------------ | |
# Specify VS Code as default editor for the React Native Simulator | |
export REACT_EDITOR=code-insiders | |
# Set VS Code Insiders as default code editor | |
export EDITOR=code-insiders | |
# Android SDK | |
export ANDROID_HOME=~/Library/Android/sdk |
This file contains hidden or 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
# My aliases | |
# Easier navigation | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias ....="cd ../../.." | |
alias .....="cd ../../../.." | |
# ls stuff, most are set in lib/directories.zsh | |
# I use lsd (https://github.com/Peltoche/lsd) for certain listings |
This file contains hidden or 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
/* | |
RxNorm SCDC and Brand/Generic RXCUI (SCD/SBD/GPCK/BPCK) to NDC Crosswalks | |
We care about semantically defined RxNorm normal forms for clinical/branded drugs and packs ONLY. | |
Certain NDCs that are associated with Non-RxNorm Concepts are ignored even though these may occur (infrequently) in real data. | |
e.g. | |
44946104501 | |
50967031730 | |
76439025810 |
This file contains hidden or 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
CALL apoc.meta.data() YIELD label, property, type, elementType | |
WHERE elementType <> 'relationship' | |
AND type <> 'RELATIONSHIP' | |
WITH label, collect(property + ' (' + type + ')') AS properties | |
WITH apoc.map.fromLists(collect(label), collect(properties)) AS properties_map | |
CALL apoc.meta.graph() YIELD nodes, relationships | |
UNWIND nodes AS n | |
WITH n, apoc.node.labels(n)[0] AS label, properties_map, relationships |
This file contains hidden or 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
<NotepadPlus> | |
<UserLang name="OmniMark" ext="ARG XAR XIN XMD XOM XOP"> | |
<Settings> | |
<Global caseIgnored="yes" escapeChar="%" /> | |
<TreatAsSymbol comment="no" commentLine="yes" /> | |
<Prefix words1="no" words2="no" words3="no" words4="no" /> | |
</Settings> | |
<KeywordLists> | |
<Keywords name="Delimiters">"'0"'0</Keywords> | |
<Keywords name="Folder+"></Keywords> |
NewerOlder