Skip to content

Instantly share code, notes, and snippets.

😇

Alexis Tyler OmgImAlexis

😇
Block or report user

Report or block OmgImAlexis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View docker_log_size
co=$(docker inspect --format='{{.Name}}' $(docker ps -aq --no-trunc) | sed 's/^.\(.*\)/\1/' | sort); for c_name in $co; do c_size=$(docker inspect --format={{.ID}} $c_name | xargs -I @ sh -c 'ls -hl /var/lib/docker/containers/@/@-json.log' | awk '{print $5 }'); YE='\033[1;33m'; NC='\033[0m'; PI='\033[1;35m'; RE='\033[1;31m'; case "$c_size" in *"K"*) c_size=${YE}$c_size${NC};; *"M"*) p=${c_size%.*}; q=${p%M*}; r=${#q}; if [[ $r -lt 3 ]]; then c_size=${PI}$c_size${NC}; else c_size=${RE}$c_size${NC}; fi ;; esac; echo -e "$c_name $c_size"; done
View gist:f63479fdf70ec58b9f92fe00e6028cb0
$(document).ready(function() {
$('a').on('click', function() {
this.href = 'http://google.com';
});
});
View gist:4337ed0b43b2cff930ace1888f14de10
<%inherit file="/layouts/main.mako"/>
<%!
from medusa import app
from medusa.helpers import anon_url
from medusa.indexers.indexer_api import indexerApi
from medusa.indexers.utils import indexer_id_to_name, mappings
from medusa import sbdatetime
from random import choice
import datetime
import time
View kong.yml
version: '3.0'
services:
database:
image: postgres:9.5
ports:
- 5432:5432
environment:
- POSTGRES_USER=kong
- POSTGRES_DB=kong
View docker-compose.yml
version: "3"
services:
http_default_server:
image: twistly/default_server
networks:
- internal
deploy:
mode: global
labels:
View gist:353a0b621b1491e28e237c3dbbab587e
0.0.0.0 {
filter rule {
path .*
search_pattern example.com
replacement {request_host}
}
}
View gist:9a83a4982be0e0f741aebbf0325adc58
const emitKeyEvents = (obj, path = null) => {
return new Proxy(obj, {
get: (target, key, receiver) => {
if (typeof target[key] === 'object' && target[key] !== null) {
return emitKeyEvents(target[key], path ? `${path}.${key}` : key);
}
return Reflect.get(target, key, receiver);
},
set: (target, key, value, receiver) => {
this.emit(path ? `${path}.${key}` : key, value);
View gist:2ffeaf308cee508105849f08a91e7a17
var post_ids = Object.keys(archive_posts);
var postsToSend = [];
var hostname = window.location.hostname;
if (jQuery("#postEditData").val().trim() != "") {
var edit = jQuery("#postEditData").val();
}
for (var i = 0; i < post_ids.length; i++) {
var p = {
View gist:0feada01f401ef12aed3e90b24e505e8
iframe.tmblr-iframe.tmblr-iframe--unified-controls.tmblr-iframe--loaded.iframe-controls--desktop {
z-index: 1000000000;
top: 35px;
right: 35px;
}
You can’t perform that action at this time.