This file contains 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
/** | |
* 1. Immediate retry | |
* 2. delayed retry | |
* 3. retry with backoff | |
*/ | |
import { Injectable } from "@angular/core"; | |
import { HttpClient } from "@angular/common/http"; | |
import { EMPTY, Observable, of, throwError } from "rxjs"; | |
import { |
This file contains 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
// create a bookmark and use this code as the URL, you can now toggle the css on/off | |
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
javascript: (function() { | |
var elements = document.body.getElementsByTagName('*'); | |
var items = []; | |
for (var i = 0; i < elements.length; i++) { | |
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) { | |
items.push(elements[i]); | |
} | |
} |
This file contains 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/bash -e | |
## Configuration | |
JENKINS="https://my-jenkins.localhost" | |
JENKINS_USER="user_name_here" | |
JENKINS_USER_TOKEN="api_token_here" | |
# nested path to job |
This file contains 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/bash | |
# (c) Toni Moreno | |
# tool to import / export graphs and dashboards to mysql db | |
# NOTE: be sure you have granted FILE privileges | |
# if apparmor is configured you should add to | |
# /etc/apparmor.d/usr.sbin.mysqld | |
# /tmp/* rw, | |
LOCAL_SETINGS="/opt/graphite/webapp/graphite/local_settings.py" |
This file contains 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/bash | |
INSTALL_DIR="~/third-party/" | |
mkdir -p "$INSTALL_DIR" | |
cd "$INSTALL_DIR" | |
git clone https://github.com/brendangregg/FlameGraph | |
sudo ln -s "$INSTALL_DIR"/FlameGraph/flamegraph.pl /usr/local/bin/flamegraph.pl |
This file contains 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
<?php | |
define('MAGENTO', realpath(dirname(__FILE__))); | |
require_once (MAGENTO . '/app/Mage.php'); | |
Mage::app(); | |
$password = 'super-secret'; | |
$hash = Mage::helper('core')->getHash($password, Mage_Admin_Model_User::HASH_SALT_LENGTH); |
This file contains 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 | |
set -e | |
set -x | |
LOG_DIR=$HOME/graphite-volumes/var-log | |
DATA_DIR=$HOME/graphite-volumes/graphite-storage | |
VOLUMES_INIT_CONTAINER_NAME=graphite-volumes-init |
This file contains 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
# Send a metric to statsd from bash | |
# | |
# Useful for: | |
# deploy scripts (http://codeascraft.etsy.com/2010/12/08/track-every-release/) | |
# init scripts | |
# sending metrics via crontab one-liners | |
# sprinkling in existing bash scripts. | |
# | |
# netcat options: | |
# -w timeout If a connection and stdin are idle for more than timeout seconds, then the connection is silently closed. |
This file contains 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
public function indexAction() | |
{ | |
$html = $this->getLayout() | |
->createBlock('core/profiler') | |
->toHtml(); | |
$this->getResponse()->setBody($html); | |
} |
This file contains 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
@echo off | |
setlocal enabledelayedexpansion | |
REM | |
REM PngOutBatch | |
REM | |
REM Nic Jansma - nic@nicj.net | |
REM | |
REM Runs a PNG through PngOut multiple times at different block sizes. Shows the | |
REM file-size savings during and at the end. |
NewerOlder