Skip to content

Instantly share code, notes, and snippets.

View srinivasreddy's full-sized avatar
🎯
Focusing, Deepwork

Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) srinivasreddy

🎯
Focusing, Deepwork
View GitHub Profile
export DOCKER_HOST=tcp://192.168.59.103:2375
@srinivasreddy
srinivasreddy / docker-cleanup-resources.md
Created June 20, 2018 11:28 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

cargo git:(master) echo $NAME
➜ cargo git:(master) export NAME='Srinivas'
➜ cargo git:(master) echo $NAME
Srinivas
➜ cargo git:(master) python
Python 2.7.12 (default, Nov 20 2017, 18:23:56)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import o
This file has been truncated, but you can view the full file.
Started by upstream project "pull-requests-trusty" build number 13771
originally caused by:
GitHub PR #<a href="https://github.com/django/django/pull/8773">8773</a>, Commit changed
Building remotely on trusty1 (trusty-pr) in workspace /home/jenkins/workspace/pull-requests-trusty/database/mysql/label/trusty-pr/python/python3.4
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url git://github.com/django/django.git # timeout=10
Fetching upstream changes from git://github.com/django/django.git
> git --version # timeout=10
> git fetch --tags --progress git://github.com/django/django.git +refs/pull/8773/merge:refs/remotes/origin/pull/8773/merge

This is a plain-text version of Bret Victor’s reading list. It was requested by hf on Hacker News.


Highly recommended things!

This is my five-star list. These are my favorite things in all the world.

A few of these works have had an extraordinary effect on my life or way of thinking. They get a sixth star. ★

;;
;; NS CHEATSHEET
;;
;; * :require makes functions available with a namespace prefix.
;;
;; * :use makes functions available without a namespace prefix
;; (i.e., refers functions to the current namespace).
;;
;; * :import refers Java classes to the current namespace.
;;
class A(object):
pass
class B(A):
pass
class C(B):
pass
#The above example shows multi-level inheritance,
class A(object):
a='hello'
def printing(self):
a='world'
print a
print self.a
@srinivasreddy
srinivasreddy / master.cf
Created December 4, 2012 07:30
Master.cf
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
@srinivasreddy
srinivasreddy / main.cf
Created December 4, 2012 07:29
Main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no