This gist is to remind me (and anyone else who it helps) how to quickly disable and re-enable Notification Center.
- Open your terminal (<⌘ + ␣ (spacebar)>, then type "terminal", then press <↩ (enter)>).
#!/usr/bin/env ruby | |
# ./apib2httpsnippets | |
# Author: Max Novakovic | |
# Email: max@lateral.io | |
require 'awesome_print' | |
require 'json' | |
require 'fileutils' | |
require 'uri' |
#!/bin/sh | |
# Which md files to compile | |
declare -a arr=("hybrid-recommender" "text-matching" "pre-populated-recommenders") | |
# Now loop through the above array | |
for i in "${arr[@]}" | |
do | |
# Where to store the documentation |
{ | |
"id": "marathon-lb-autoscale", | |
"args":[ | |
"--marathon", "http://leader.mesos:8080", | |
"--haproxy", "http://marathon-lb.marathon.mesos:9090", | |
"--target-rps", "100", | |
"--apps", "nginx_10000" | |
], | |
"cpus": 0.1, | |
"mem": 16.0, |
# REFERENCES: | |
# - https://github.com/puckel/docker-airflow | |
# - https://github.com/ImDarrenG/mesos-framework-dev/blob/master/Dockerfile | |
# - https://github.com/Stibbons/docker-airflow-mesos | |
# Wherever you store your mesos image built from Dockerfile-mesos | |
FROM slicelife/mesos:1.4.0 as mesos | |
FROM ubuntu:16.04 | |
# Never prompts the user for choices on installation/configuration of packages | |
ENV DEBIAN_FRONTEND noninteractive |
""" | |
Note: There are several variations to do the same thing (see # or). The idea | |
is to choose the best (one or so) of the variations and implement that. I.E. | |
these are different designs possibilities for the API. | |
""" | |
""" | |
Filtering | |
""" |
import jenkins.model.* | |
import com.cloudbees.plugins.credentials.* | |
import com.cloudbees.plugins.credentials.common.* | |
import com.cloudbees.plugins.credentials.domains.* | |
import com.cloudbees.plugins.credentials.impl.* | |
import com.cloudbees.jenkins.plugins.sshcredentials.impl.* | |
import org.jenkinsci.plugins.plaincredentials.* | |
import org.jenkinsci.plugins.plaincredentials.impl.* | |
import hudson.util.Secret | |
import hudson.plugins.sshslaves.* |
// This script is for Jenkins' Groovy console, and sets a timeout | |
// strategy for any job which doesn't have one. | |
// Based on http://janmaterne.wordpress.com/2010/07/11/how-to-check-if-all-hudson-jobs-have-a-timeout/ | |
// Updated and modified by Sean Flanigan. | |
import hudson.model.* | |
String describe(strat) { | |
if (strat instanceof hudson.plugins.build_timeout.impl.ElasticTimeOutStrategy) { | |
return "Elastic(${strat.timeoutPercentage}, ${strat.numberOfBuilds}, ${strat.timeoutMinutesElasticDefault})" |
# Thanks to this post: | |
# http://blog.ikato.com/post/15675823000/how-to-install-consolas-font-on-mac-os-x | |
$ brew install cabextract | |
$ cd ~/Downloads | |
$ mkdir consolas | |
$ cd consolas | |
$ curl -O http://download.microsoft.com/download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26/PowerPointViewer.exe | |
$ cabextract PowerPointViewer.exe | |
$ cabextract ppviewer.cab |
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md | |
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192 | |
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB. | |
------------ | |
-- Basics -- | |
------------ | |
-- Get indexes of tables |