Skip to content

Instantly share code, notes, and snippets.

View mariusgrigaitis's full-sized avatar

Marius Grigaitis mariusgrigaitis

  • NFQ | home24
  • Vilnius, Lithuania
View GitHub Profile
$ 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!
| |
#!/bin/bash
trap handle SIGINT
# run if received
handle()
{
kill -2 $CURRENT_PID
echo -en "\n Exiting Current process [$CURRENT_PID] $?\n"
exit $?
(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
(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"
import signal
def intHandler(signum, frame):
print "user pressed ctrl-c"
raise KeyboardInterrupt()
# Set the signal handler
signal.signal(signal.SIGINT, intHandler)
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"
# 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
; 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)
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]

asdasdas asdasd asdasdas