Skip to content

Instantly share code, notes, and snippets.

Marius Grigaitis mariusgrigaitis

  • .NFQ | Home24
  • Vilnius, Lithuania
View GitHub Profile
View gist:5bc04c0bab82aed2b64502edc0438570
Sending build context to Docker daemon 2.048 kB
Step 1/2 : FROM php:7.0-fpm
---> a4ecb424acb5
Step 2/2 : RUN apt-get update && apt-get install -y libmemcached-dev && pecl install memcached && docker-php-ext-enable memcached
---> Running in 73eecc7fb189
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Get:2 http://security.debian.org jessie/updates/main amd64 Packages [421 kB]
Ign http://deb.debian.org jessie InRelease
Get:3 http://deb.debian.org jessie-updates InRelease [145 kB]
Get:4 http://deb.debian.org jessie Release.gpg [2373 B]
View etc_php7_fpm_poold_www.conf
; Start a new pool named 'www'.
; the variable $pool can we used in any directive and will be replaced by the
; pool name ('www' here)
[www]
; Per pool prefix
; It only applies on the following directives:
; - 'access.log'
; - 'slowlog'
; - 'listen' (unixsocket)
View gist:47d756c26c78ea9bfaa3
# rpcinfo -p 192.168.56.1
program vers proto port service
100000 2 udp 111 portmapper
100000 3 udp 111 portmapper
100000 4 udp 111 portmapper
100000 2 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 4 tcp 111 portmapper
100024 1 udp 769 status
100024 1 tcp 1021 status
View gist:d18e5e478edeb3b7b77c
09:36 PM]-[root@local]-[/tmp]
# sudo mount -vvv -o "vers=3,udp" 192.168.56.1:/Users/mgrigaitis/work/akademija/vagrant_puphpet /tmp/test
mount: fstab path: "/etc/fstab"
mount: mtab path: "/etc/mtab"
mount: lock path: "/etc/mtab~"
mount: temp path: "/etc/mtab.tmp"
mount: UID: 0
mount: eUID: 0
mount: no type was given - I'll assume nfs because of the colon
mount: spec: "192.168.56.1:/Users/mgrigaitis/work/akademija/vagrant_puphpet"
View gist:b914c8303ce18d9660c7
import signal
def intHandler(signum, frame):
print "user pressed ctrl-c"
raise KeyboardInterrupt()
# Set the signal handler
signal.signal(signal.SIGINT, intHandler)
View gist:b9f14350852d6b51ae4a
(venv)➜ /tmp cat test3.sh
#!/bin/bash
trap handle SIGINT
# run if received
handle()
{
kill -2 $CURRENT_PID
echo -en "\n Exiting Current process [$CURRENT_PID] $?\n"
View gist:6cc8f2e99fb23ec826ce
(venv)➜ /tmp ps aux | grep python | head -n 1
mgrigaitis 78214 100,0 0,0 2464024 3748 s000 R 2:40 0:49.16 python -c while True: pass
(venv)➜ /tmp kill -2 78214
(venv)➜ /tmp ps aux | grep python | head -n 1
mgrigaitis 78214 99,4 0,0 2464024 3748 s000 R 2:40 0:58.24 python -c while True: pass
View gist:9d2a10b309830f9d6e74
#!/bin/bash
trap handle SIGINT
# run if received
handle()
{
kill -2 $CURRENT_PID
echo -en "\n Exiting Current process [$CURRENT_PID] $?\n"
exit $?
View gist:d46b6039ca7554645767
$ ssh whoami.filippo.io
The authenticity of host 'whoami.filippo.io (178.32.139.168)' can't be established.
RSA key fingerprint is c8:9a:b0:9d:59:96:24:37:70:4c:ef:eb:31:47:68:40.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'whoami.filippo.io,178.32.139.168' (RSA) to the list of known hosts.
+---------------------------------------------------------------------+
| |
| _o/ Hello Marius Grigaitis!
| |
You can’t perform that action at this time.