Skip to content

Instantly share code, notes, and snippets.

910
1984
 DZRJ
-
()
(UB 19881)
(UB 19882)
(UFG 13985)
(UFG 13986)
*
@Eyal-Shalev
Eyal-Shalev / DAMP - Docker-Apache-MySQL-PHP.md
Last active February 23, 2024 11:59
DAMP - Docker Apache MySQL PHP setup

DAMP - Setup an Apache, MySQL & PHP local server using Docker

Prerequisites

Setup

  1. Create a new directory for your local server (MY_APP is used as a placeholder)
  2. Add docker-compose.yml, Dockerfile and nginx.conf files to the root of your server directory.
  3. With your favorite terminal application:
@rdmpage
rdmpage / primers.txt
Last active May 17, 2018 10:10
COI DNA barcode primer locations
Reference COI is NC_003128 Buteo buteo COI
TZBRD035-15.COI-5P [648bp] ctgatctttggtgnatgagcaggcatagccggcacagcacttagcctactaatccgcgcagaactaggacagccaggaacactattgggagacgaccaaatctacaatgtaatcgtaacagcccacgctttcgtcataatcttcttcatagtcatacctattatgatcggaggcttcggaaactgactggttccactcataattggcgccccagacatagcattcccccgcataaataatatgagcttctgactcctcccaccttcttttctcctcctactagcctcctctacagtagaagccggggctggcactggatgaactgtttatccacccctagccggtaatcttgcccacgcgggcgcatcagtagacctggctattttttcccttcacttggcaggcgtgtcgtccatcttaggagctattaactttatcaccacaattattaacataaagccccctgcactatcacaatatcaaacacccctcttcgtatgatccgtcctcattactgctatcctcttactactatccctgccagtcctagccgccgggattacaatactcctcaccgatcgcaacctcaacactacattctttgaccctgcaggaggaggagacccaatcctgtatcaacacctattc
TZBRD019-15.COI-5P tcttcggcgcctgagctggtatagtcggcaccgccctcagcttactcatccgtgcagaactcggccaacccggcacactcctaggtgacgaccaaatttataacgtaatcgttaccgcacatgccttcgtaataatcttcttcatagttataccaatcatgatcggaggattcggaaactgacttgttccactcataattggcgctc
@ilevantis
ilevantis / EvolDir-RSSifier.php
Created February 27, 2016 23:58
Turn EvolDir categories into RSS feeds
<?php
header('Content-Type: application/rss+xml; charset=UTF-8');
$list_name = htmlspecialchars($_GET['lname']);
$list_url = 'http://life.mcmaster.ca/cgi-bin/my_wrap/brian/evoldir/'.$list_name.'/';
$month_num = array (
"Jan" => 1,
"Feb" => 2,
@nickynicolson
nickynicolson / name-reconciliation-python.ipynb
Last active February 12, 2016 16:25
Name reconciliation in Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@justinbellamy
justinbellamy / cltools.sh
Last active March 6, 2022 03:46 — forked from jellybeansoup/cltools.sh
Install Autoconf and Automake on OS X El Capitan
#!/bin/sh
##
# Install autoconf, automake and libtool smoothly on Mac OS X.
# Newer versions of these libraries are available and may work better on OS X
#
# This script is originally from http://jsdelfino.blogspot.com.au/2012/08/autoconf-and-automake-on-mac-os-x.html
#
export build=~/devtools # or wherever you'd like to build
@liamato
liamato / decodeHtmlEntities.js
Created October 29, 2015 22:14
decodeHtmlEntities.js
/**
* Decodes html entities by name and number
*/
var decodeHtmlEntities = function(str) {
return str.replace(/&#?(\w+);/g, function(match, dec) {
if(isNaN(dec)) {
chars = {quot: 34, amp: 38, lt: 60, gt: 62, nbsp: 160, copy: 169, reg: 174, deg: 176, frasl: 47, trade: 8482, euro: 8364, Agrave: 192, Aacute: 193, Acirc: 194, Atilde: 195, Auml: 196, Aring: 197, AElig: 198, Ccedil: 199, Egrave: 200, Eacute: 201, Ecirc: 202, Euml: 203, Igrave: 204, Iacute: 205, Icirc: 206, Iuml: 207, ETH: 208, Ntilde: 209, Ograve: 210, Oacute: 211, Ocirc: 212, Otilde: 213, Ouml: 214, times: 215, Oslash: 216, Ugrave: 217, Uacute: 218, Ucirc: 219, Uuml: 220, Yacute: 221, THORN: 222, szlig: 223, agrave: 224, aacute: 225, acirc: 226, atilde: 227, auml: 228, aring: 229, aelig: 230, ccedil: 231, egrave: 232, eacute: 233, ecirc: 234, euml: 235, igrave: 236, iacute: 237, icirc: 238, iuml: 239, eth: 240, ntilde: 241, ograve: 242, oacute: 243, ocirc: 244, otilde: 245, ouml: 246, divide: 247, oslash: 248, ugrave: 249
@edsu
edsu / gist:c95c9ae9f60ecdf80077
Last active January 21, 2016 15:46
Look up WikiData ID based using a Freebase ID. Possibly useful if you have lots of Freebase ids and want to turn them into WikiData ids when Freebase goes the way of the Dodo in June.
% curl --silent 'https://wdq.wmflabs.org/api?q=string\[646:/m/04hcw\]' | python -mjson.tool
{
"items": [
9391
],
"status": {
"error": "OK",
"items": 1,
"parsed_query": "STRING[646:'/m/04hcw']",
"querytime": "113ms"
@tomzeppenfeldt
tomzeppenfeldt / gist:40364ac2a52f57aa520a
Last active August 29, 2015 14:01
Network versioning using transition nodes
= Network versioning using relationnodes
Recently there was a nice blog on versioning networks by Ian Robinson (http://iansrobinson.com/2014/05/13/time-based-versioned-graphs/[read it here]) on using identity nodes and separating structure from state. In this gist I'd like to put in my 2 cents by introducing another approach using _relationnodes_. This is more about structure of a network than about states of nodes, but it treats versioning differently. As Ian states in his blog, there's always a trade-off to be made, since versioning causes an extra load on storage and processing.
== Relationnodes?
=== What are relationnodes?
Relation nodes are intermediary nodes between two network nodes that represents the relation between the nodes.
So, if A and B are two network nodes, instead of connecting them with a relationship of `[:RELTYPE]`,
@umidjons
umidjons / sort-object-properties-by-value.md
Last active January 16, 2024 13:00
JavaScript: sort object properties by value (numeric or string)

Sort object properties by value (values are text)

I have following object:

var cities={10:'Tashkent', 14:'Karakalpakiya', 16:'Andijan'};

I want sort it by city names, so after sort it should be:

var cities={16:'Andijan', 14:'Karakalpakiya', 10:'Tashkent'};

But I can't sort object properties, instead can convert object into array, then sort items.