Skip to content

Instantly share code, notes, and snippets.

Pat Erler perler

  • Dresden, Germany
Block or report user

Report or block perler

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 1
perler /
Created Feb 21, 2018
remove all files in a directory with a lot of them
cd ../durectory_with_a_lot_of_files
perl -e 'for(<*>){((stat)[9]<(unlink))}'
View gist:e6a150f51d6b84ff8fd85c64246e5516
# lsscsi -g
[0:0:0:0] disk ASR8405 LogicalDrv 0 V1.0 /dev/sda /dev/sg0
[0:0:1:0] disk ASR8405 LogicalDrv 1 V1.0 /dev/sdb /dev/sg1
[0:1:4:0] disk ATA HGST HUS726060AL T907 - /dev/sg2
[0:1:5:0] disk ATA HGST HUS726060AL T907 - /dev/sg3
[0:1:6:0] disk ATA HGST HUS726060AL T907 - /dev/sg4
[0:1:7:0] disk ATA HGST HUS726060AL T907 - /dev/sg5
[0:1:8:0] disk ATA HGST HUS726060AL T907 - /dev/sg6
[0:1:9:0] disk ATA HGST HUS726060AL T907 - /dev/sg7
[0:1:10:0] disk ATA HGST HUS726060AL T907 - /dev/sg8
View mysql 5.7 ubuntu 16 reinstall
rm /etc/mysql/my.cnf
rm -r /etc/mysql/mysql.conf.d/
rm /etc/mysql/debian.cnf
apt purge -y mysql-server mysql-server-5.7 mysql-server-core-5.7
apt install -y mysql-server
service mysql restart
View gist:ddc0681de18206a6c0ba46a50368fe6b
[2017-07-06 17:21:06,475] {/usr/local/lib/python2.7/dist-packages/flask/} ERROR - Exception on /shelf/1 [GET]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/", line 1612, in full_dispatch_request
rv = self.dispatch_request()
perler / 0_reuse_code.js
Created Mar 30, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View letsencrypt
2016-07-10 11:55:12,256:DEBUG:certbot.main:Root logging level set at 30
2016-07-10 11:55:12,256:INFO:certbot.main:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2016-07-10 11:55:12,256:DEBUG:certbot.main:certbot version: 0.8.0
2016-07-10 11:55:12,256:DEBUG:certbot.main:Arguments: ['-a', 'webroot', '-d', '', '-d', '', '--webroot-path', '/home/chinnamasta/public_html', '--duplicate', '--config', '/tmp/.webmin/6145_19669_1_letsencrypt.cgi']
2016-07-10 11:55:12,257:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#webroot,PluginEntryPoint#null,PluginEntryPoint#manual,PluginEntryPoint#standalone)
2016-07-10 11:55:12,257:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None
2016-07-10 11:55:12,263:DEBUG:certbot.plugins.selection:Single candidate plugin: * webroot
Description: Place files in webroot directory
Interfaces: IAuthenticator, IPlugin
Entry point: webroot = certbot.plugins.webroot:Authentica
perler / aquaio.js
Last active Apr 3, 2017
access to medical db
View aquaio.js
var fs = require('fs'),
path = require('path'),
Twit = require('twit'),
request = require('request'),
aquaIo = require('aqua-io'),
config = require(path.join(__dirname, 'config.js'));
var client = aquaIo.client({
You can’t perform that action at this time.