I hereby claim:
- I am mossman1215 on github.
- I am mossman1215 (https://keybase.io/mossman1215) on keybase.
- I have a public key ASAuKCd0pltWF-VE_tXaw9zAXOGartSlNO7f3uznOg19Qwo
To claim this, I am signing this object:
#grep the logs like this | |
#grep "SERVICE ALERT: <instanceid>;Load;.* : CRITICAL" /var/log/nagios3/archives/nagios-* > critical_load.txt | |
<?php | |
$file = file('~/critical_load.txt'); | |
#initialise empty hashmap | |
$map = array(); | |
$hours = array(); | |
foreach($file as $line){ | |
#read timestamp | |
$guffpos = strpos($line,'[')+1; |
(defun save-gdrive () | |
"Sync org file to GDrive with rclone." | |
(when (eq major-mode 'org-mode) | |
(shell-command-to-string "rclone sync $HOME/org/notes.org gdrive:notes.org") | |
(shell-command-to-string "rclone sync $HOME/org/notes.org_archive gdrive:notes.org_archive") | |
)) | |
(add-hook 'after-save-hook 'save-gdrive) |
#from https://minzkraut.com/2016/11/23/making-a-simple-spritesheet-generator-in-python/ | |
from PIL import Image | |
import os, math, time | |
max_frames_row = 16.0 | |
frames = [] | |
tile_width = 0 | |
tile_height = 0 | |
spritesheet_width = 0 | |
spritesheet_height = 0 |
import bpy | |
import bpy_extras | |
import json | |
import os | |
from mathutils import * | |
from math import * | |
def write_frame(scene): | |
print("----Starting Render function----") | |
with open('collision.json', 'r') as f: |
- name: Install and Configure Solr | |
hosts: localhost | |
become: yes | |
gather_facts: yes | |
vars: | |
solr_change_default_password: False | |
solr_port: 80 | |
roles: | |
- role: lean_delivery.java | |
- role: lean_delivery.solr_standalone |
#References | |
#base script | |
#https://stackoverflow.com/questions/22988384/powershell-change-owner-of-files-and-folders | |
#parameters | |
#https://powershell.org/forums/topic/file-path-parameter/ | |
param ( | |
[Parameter(Mandatory=$true)] | |
[ValidateScript({Test-Path -Path $_})] | |
[string]$path | |
) |
port: | |
tcp:222: | |
listening: true | |
ip: | |
- 0.0.0.0 | |
tcp6:80: | |
listening: true | |
ip: | |
- '::' | |
tcp6:222: |
<?php | |
namespace SilverStripe\Com\Tasks; | |
use Psr\Log\LoggerInterface; | |
use SilverStripe\Core\Injector\Injector; | |
use SilverStripe\Dev\BuildTask; | |
use SilverStripe\Versioned\Versioned; | |
use SilverStripe\CMS\Model\SiteTree; | |
/** | |
* export site tree for performance testing |
#requires pyvips and ruby-image-processing on ubuntu | |
import pyvips | |
import argparse | |
import pathlib | |
parser = argparse.ArgumentParser(description='resize images ') | |
parser.add_argument('images', metavar='file', nargs='+', | |
help='paths to files to shrink') | |
args = parser.parse_args() | |
for filepath in args.images: | |
image = pyvips.Image.new_from_file(filepath, access='sequential') |
I hereby claim:
To claim this, I am signing this object: