Keybase proof
I hereby claim:
- I am strangeman on github.
- I am strangeman (https://keybase.io/strangeman) on keybase.
- I have a public key whose fingerprint is 10DB 437A 455A AD17 E086 5AFF 815E C530 5632 CC33
To claim this, I am signing this object:
- name: Generate uniq path | |
set_fact: | |
site_tmp_path: "/tmp/npm/{{ ansible_date_time.iso8601_micro | to_uuid }}" | |
- name: Create a {{ site_tmp_path }} directory if it does not exist | |
file: | |
path: '{{ site_tmp_path }}' | |
state: directory | |
become: false |
import json | |
import requests | |
API_KEY="longrandomstring" # Sentry API key with event:admin scope | |
ORG_SLUG = "organization" # organization slug | |
PROJECT_SLUG = "nice-project" # project slug | |
SENTRY_ROOT = "https://sentry.example.com/" # root Sentry URL | |
BATCH_SIZE = 20 # how many issues deletes by one request (from 1 to 100) | |
headers = {'Authorization': f'Bearer {API_KEY}'} |
use std::f64; | |
use std::f64::NAN; | |
fn vincenty_distance(lat1: f64, lon1: f64, lat2: f64, lon2: f64) -> f64 { | |
let a: f64 = 6378137.0; | |
let f: f64 = 1.0/298.257223563; | |
let b: f64 = 6356752.314245; | |
let epsilon: f64 = 1e-12; |
echo "DEBUG: got project_id ${project_id} and template_id ${template_id}" | |
withCredentials([[$class: 'StringBinding', credentialsId: 'semaphore-token', variable: 'bearer']]) { | |
httpRequest acceptType: 'APPLICATION_JSON', consoleLogResponseBody: true, contentType: 'APPLICATION_JSON', customHeaders: [[name: 'Authorization', value: "Bearer ${env.bearer}"]], httpMode: 'POST', requestBody: """{ | |
\"template_id\": ${template_id}, | |
\"debug\": false, | |
\"dry_run\": false, | |
\"playbook\": \"\", | |
\"environment\": \"\" | |
}""", url: "https://ansible.ourdomain.com/api/project/${project_id}/tasks" | |
} |
#!/usr/bin/env python | |
import sys, string, re, types | |
import yaml | |
from xml.dom import minidom | |
from xml.dom import Node | |
# |
I hereby claim:
To claim this, I am signing this object:
from time import sleep | |
import os | |
path = '/var/cache/nginx/client_temp/' | |
for file_name in xrange(0, 9999999999): | |
file_path = '/var/cache/nginx/client_temp/'+str(file_name).zfill(10) | |
print 'trying to delete '+file_path | |
try: | |
os.remove(file_path) |
worker_processes auto; | |
events { | |
use epoll; | |
worker_connections 1024; | |
multi_accept on; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
} | |
acl purge { | |
"127.0.0.1"; | |
"localhost"; | |
} |
#!/bin/bash | |
#create user for dump | |
#mysql> GRANT SHOW DATABASES, SELECT, LOCK TABLES, RELOAD ON *.* to dump@localhost IDENTIFIED BY 'dumppwd'; | |
#mysql> FLUSH PRIVILEGES; | |
BACKUP_PATH=/mnt/mysqlbackup/dump | |
# make backup directory | |
mkdir -p $BACKUP_PATH |