Skip to content

Instantly share code, notes, and snippets.

import string
from random import sample
rand_strings = set()
string_count = 100
string_len = 8
string_prefix = ""
char_choices = string.uppercase + string.digits
for /d %%i in ("%systemroot%\Microsoft.Net\Framework\v*") do for /d %%f in ("%%i\Temporary ASP.NET Files\*") do RD /q/s "%%f"
{
"messages": " \u001b[1m\u001b[35mExternalPlatform Load (1.5ms)\u001b[0m SELECT <REST OF QUERY>\u001b[0m\n{\"method\":\"GET\",\"path\":\"/api/v1/settings/header_info\",\"format\":\"*/*\",\"controller\":\"api/v1/settings\",\"action\":\"header_info\",\"status\":200,\"duration\":20.04,\"view\":0.21,\"db\":9.41}",
"level": "INFO"
}
#!/usr/bin/env python2
import random
for i in range(0, 100):
if not i % 15:
random.seed(1178741599)
print([i+1, "Fizz", "Buzz", "FizzBuzz"][random.randint(0,3)])
@mpilar
mpilar / curl_debug.netdna-cdn.txt
Last active August 29, 2015 14:10
curl output
[ec2-user@ip-10-0-255-91 ~]$ curl http://debug.netdna-cdn.com
You are hitting the MaxCDN New York Datacenter<br>
<img src=netdna.gif?city=3 >
@mpilar
mpilar / base-prod-thumbor.conf
Last active June 4, 2019 06:02
supervisord conf
STORAGE = 'thumbor.storages.redis_storage'
# ALLOW_UNSAFE_URL = True
AUTO_WEBP = True
DETECTORS = [ 'thumbor.detectors.face_detector', 'thumbor.detectors.feature_detector' ]
OPTIMIZERS = ['thumbor.optimizers.jpegtran', 'thumbor.optimizers.gifv']
MAX_AGE = 30 * 24 * 60 * 60
FFMPEG_PATH = '/usr/bin/avconv'
## Insert private stuff next:
@mpilar
mpilar / #etc#nginx#conf.d#webapp_healthd.conf
Last active September 19, 2017 21:07
beanstalk default nginx config
upstream my_app {
server unix:///var/run/puma/my_app.sock;
}
log_format healthd '$msec"$uri"'
'$status"$request_time"$upstream_response_time"'
'$http_x_forwarded_for';
server {
listen 80;
ubuntu@ip-10-236-164-55:~$ dig +trace www.elnuevodia.com
; <<>> DiG 9.8.1-P1 <<>> +trace www.elnuevodia.com
;; global options: +cmd
. 518400 IN NS A.ROOT-SERVERS.NET.
. 518400 IN NS B.ROOT-SERVERS.NET.
. 518400 IN NS C.ROOT-SERVERS.NET.
. 518400 IN NS D.ROOT-SERVERS.NET.
. 518400 IN NS E.ROOT-SERVERS.NET.
. 518400 IN NS F.ROOT-SERVERS.NET.
@mpilar
mpilar / gist:0d6c9b97697ef0c6586e
Created December 10, 2015 03:08
ph.com dig trace
ubuntu@ip-10-236-164-55:~$ dig +trace www.primerahora.com
; <<>> DiG 9.8.1-P1 <<>> +trace www.primerahora.com
;; global options: +cmd
. 518400 IN NS M.ROOT-SERVERS.NET.
. 518400 IN NS A.ROOT-SERVERS.NET.
. 518400 IN NS B.ROOT-SERVERS.NET.
. 518400 IN NS C.ROOT-SERVERS.NET.
. 518400 IN NS D.ROOT-SERVERS.NET.
. 518400 IN NS E.ROOT-SERVERS.NET.
files:
"/etc/nginx/conf.d/000_shop_config.conf":
mode: "000644"
content: |
client_max_body_size 100m;
client_body_buffer_size 128k;
proxy_buffering on;
proxy_buffer_size 128k;
proxy_buffers 4 256k;