Skip to content

Instantly share code, notes, and snippets.

View naeluh's full-sized avatar
🌐
Busy

nick hulea naeluh

🌐
Busy
View GitHub Profile
@naeluh
naeluh / mongoexport-all-collections-as-json.sh
Created February 21, 2019 21:40 — forked from thbkrkr/mongoexport-all-collections-as-json.sh
Export all MongoDB collections to JSON
#!/bin/bash
DB=$1
COLLECTIONS=$(mongo localhost:27017/$DB --quiet --eval "db.getCollectionNames()" | sed 's/,/ /g')
for collection in $COLLECTIONS; do
echo "Exporting $DB/$collection ..."
mongoexport -d newtickettoolDB -c $collection -o $collection.json
done
@naeluh
naeluh / Git push deployment in 7 easy steps.md
Created February 14, 2019 04:14 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@naeluh
naeluh / git-deployment.md
Created February 14, 2019 04:14 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.

@naeluh
naeluh / download-site.md
Created September 6, 2018 17:20 — forked from pmeinhardt/download-site.md
download an entire page (including css, js, images) for offline-reading, archiving… using wget

If you ever need to download an entire website, perhaps for off-line viewing, wget can do the job — for example:

$ wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains website.org --no-parent  www.website.org/tutorials/html/

This command downloads the website www.website.org/tutorials/html/.

The options are:

  • --recursive: download the entire website
  • --domains website.org: don't follow links outside website.org
<!-- events Array
(
[0] => Array
(
[event_id] => 261
[type] => Find a Getty Villa Site Shift
[name] => Villa Site Shift, Morning
[url] => https://gettydocents.volunteerportal.org/?nd=p_vms_registration_event_detail&registration_id=261
[color] =>
[registration_start] =>
/*! bulma.io v0.7.1 | MIT License | github.com/jgthms/bulma */
@-webkit-keyframes spinAround {
from {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
to {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>signed in</title>
<script type="text/javascript" src="https://fast.fonts.net/jsapi/4326ccc7-6c83-4879-a9c9-fcaec1cb6179.js"></script>
<link rel="stylesheet" type="text/css" href="https://docents.getty.edu/wp-content/themes/bulmapress-master/frontend/bulmapress/bulma.css">
<link rel="stylesheet" type="text/css" href="https://docents.getty.edu/wp-content/themes/bulmapress-master/frontend/bulmapress/main.css">
<style id="jsbin-css">
@naeluh
naeluh / package.json
Created April 20, 2018 16:59 — forked from surma/package.json
Boilerplate for quick one-off TypeScript projects. Just run `npm start`
{
"name": "tsquickstart",
"version": "1.0.0",
"description": "Boilerplate for quick one-off TypeScript projects. Just run `npm start`",
"scripts": {
"init": "test -f tsconfig.json || (tsc --init -t ESNext -m ESNext && npm install)",
"start": "npm run init && concurrently \"npm run watch\" \"npm run serve\"",
"serve": "http-server",
"watch": "tsc -p . --watch",
"build": "tsc -p ."
wget -r --mirror --warc-file=pst --warc-cdx --page-requisites --html-extension --convert-links --execute robots=off --directory-prefix=. --span-hosts --domains=images.example.net,assets.example.net,example.net,pacificstandardtime.org --user-agent="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0" --random-wait http://www.example.com
@naeluh
naeluh / d.js
Last active April 16, 2018 17:28
J. Paul Getty Docent Site// source https://jsbin.com/helonim
window.onload = function() {
var burger = document.querySelector('.burger');
burger.addEventListener('click', function(event) {
document.getElementById('app').classList.toggle('slide-left');
document.querySelector('.burger').classList.toggle('is-active');
document.getElementById('navbarExampleTransparentExample').classList.toggle('is-active');
});
};