Skip to content

Instantly share code, notes, and snippets.

@asanchez75
asanchez75 / export_vivo.py
Created February 7, 2018 09:30 — forked from lawlesst/export_vivo.py
Jython script to connect to VIVO via SDB and export a model.
"""
Jython script to connect to VIVO via SDB and export a model.
Requires Jython 2.5 or later. Download from: http://www.jython.org/downloads.html
Assumes the VIVO harvester is on your path.
- change the database connection information to point to your VIVO database.
- change the model name to specify the VIVO model you would like to export.
- change the output_file name to the location where you want to save the RDF.
- for larger models you will want to increase the memory available to Java.
@asanchez75
asanchez75 / heredoc-dockerfile.snip
Created February 21, 2018 17:05 — forked from abn/heredoc-dockerfile.snip
Dockerfile alternatives for heredoc
#printf
RUN printf '#!/bin/bash\n\
echo hello world from line 1\n\
echo hello world from line 2'\
>> /tmp/hello
#echo
RUN echo -e '#!/bin/bash\n\
echo hello world from line 1\n\
echo hello world from line 2'\
@asanchez75
asanchez75 / docker-cleanup-resources.md
Created March 6, 2018 08:16 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

tmux cheatsheet

kill all existing sessions

tmux kill-server

As configured in my dotfiles.

start new:

@asanchez75
asanchez75 / install-php72-osx.md
Created April 3, 2018 19:00 — forked from vukanac/install-php72-osx.md
How to install php72 on Mac OS X with homebrew.

Skip this:

brew tap homebrew/dupes
brew tap homebrew/versions

As:

Warning: homebrew/dupes was deprecated. This tap is now empty as all its formulae were migrated.
Warning: homebrew/versions was deprecated. This tap is now empty as all its formulae were migrated.
@asanchez75
asanchez75 / index.html
Created April 4, 2018 19:52 — forked from CristinaSolana/index.html
Simple Responsive Grid - Simple SASS mixin generating a grid with nesting and offseting enabled for super quick prototypes. To do: properly clear first in row A CodePen by Cristina Solana
<div class="container">
<header>
<code>
.mod--foo {
@include column-span(6, 3);
}
<br>// $column-count, $offset[optional]
<br>// To do: properly clear first in row
</code>
@asanchez75
asanchez75 / install-postgres-9.6-centos7.md
Created May 17, 2018 10:02 — forked from Ch4s3/install-postgres-9.6-centos7.md
steps for installing postgres 9.6 on Centos7 or RHEL

Update the RPM package

rpm -ivh https://yum.postgresql.org/9.6/redhat/rhel-7.3-x86_64/pgdg-centos96-9.6-3.noarch.rpm

Update packages

yum update
@asanchez75
asanchez75 / tunnelbroker-net.sh
Created June 28, 2018 04:41 — forked from pklaus/tunnelbroker-net.sh
tunnelbroker.net automatic tunnel IP update and tunnel setup (on Mac OS X)
#!/bin/bash
#### This script is published by Philipp Klaus <[email protected]>
#### on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-automatic-ip-update-on-mac-os-x/>
#### It is originally by freese60 and modified by limemonkey.
#### Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0>
### Uncomment this line to debug the script:
#set -x
@asanchez75
asanchez75 / gist:98b19e7031233fa3cd03323a4b86b22f
Created July 19, 2018 12:31 — forked from drorata/gist:146ce50807d16fd4a6aa
Minimal Working example of Elasticsearch scrolling using Python client
# Initialize the scroll
page = es.search(
index = 'yourIndex',
doc_type = 'yourType',
scroll = '2m',
search_type = 'scan',
size = 1000,
body = {
# Your query's body
})