Skip to content

Instantly share code, notes, and snippets.

@darshanime
darshanime / staticchecker_warnings
Created June 14, 2019 04:19
Staticchecker Warnings for cilium
* Working on pkg/alignchecker
pkg/alignchecker/alignchecker_test.go:37:2: field ipv6 is unused (U1000)
pkg/alignchecker/alignchecker_test.go:38:2: field misc is unused (U1000)
pkg/alignchecker/alignchecker_test.go:39:2: field f is unused (U1000)
pkg/alignchecker/alignchecker_test.go:40:2: field pad4 is unused (U1000)
pkg/alignchecker/alignchecker_test.go:41:2: field pad5 is unused (U1000)
pkg/alignchecker/alignchecker_test.go:45:2: field foo is unused (U1000)
pkg/alignchecker/alignchecker_test.go:49:2: field ipv6 is unused (U1000)
pkg/alignchecker/alignchecker_test.go:53:2: field ipv6 is unused (U1000)
pkg/alignchecker/alignchecker_test.go:54:2: field misc is unused (U1000)
@darshanime
darshanime / .init.el
Created December 26, 2018 03:45
emacs multiple `quit` in `*Messages*`
(require 'package)
(add-to-list 'package-archives
'("melpa-milkbox" . "http://melpa.milkbox.net/packages/") t)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)
@darshanime
darshanime / logs.md
Created September 29, 2018 04:33
csi: hostpath-driver
  • logs for hostpath-driver
 csi (master) ✗ k logs csi-pod hostpath-driver -n csi -f
I0929 03:37:29.686108       1 hostpath.go:89] Driver: csi-hostpath 
I0929 03:37:29.686165       1 driver.go:80] Enabling controller service capability: CREATE_DELETE_VOLUME
I0929 03:37:29.686171       1 driver.go:92] Enabling volume access mode: SINGLE_NODE_WRITER
I0929 03:37:29.690233       1 server.go:108] Listening for connections on address: &net.UnixAddr{Name:"//csi/csi.sock", Net:"unix"}
I0929 03:37:29.693491       1 utils.go:96] GRPC call: /csi.v0.Identity/GetPluginInfo
I0929 03:37:29.693509       1 utils.go:97] GRPC request: 
I0929 03:37:29.693528       1 identityserver-default.go:32] Using default GetPluginInnfo
PROVISIONING STARTING.
+ mkdir -p /srv/zulip/var
Reading package lists...
Building dependency tree...
Reading state information...
lsb-release is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ touch var/apt_dependencies_hash
+ sudo ./scripts/lib/setup-apt-repo
+ SOURCES_FILE=/etc/apt/sources.list.d/zulip.list

In normal operations, the datanommer consumer daemon will be running somewhere and continuously stuff each new fedmsg message that it sees into a postgres DB. If you're just sitting down to hack on datagrepper, that won't be your situation so you'll need a dump of the database.

Note

If you've tried installing postgres before and think you've messed it up, you'll need to blow away the old databases with $ rm -rf /var/lib/pgsql

@darshanime
darshanime / init.el
Created June 2, 2017 12:16
windmove config
(use-package windmove
;; :defer 4
:ensure t
:config
;; use command key on Mac
(windmove-default-keybindings 'super)
;; wrap around at edges
(setq windmove-wrap-around t))
@darshanime
darshanime / init.el
Last active June 2, 2017 12:11
demo gist created from emacs
;; this is a trial gist created from emacs
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-language-environment 'utf-8)
(set-selection-coding-system 'utf-8)
(setq locale-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
GLOB sdist-make: /home/radar/projects/scrapy/setup.py
py27 inst-nodeps: /home/radar/projects/scrapy/.tox/dist/Scrapy-1.1.0.dev1.zip
py27 installed: blessings==1.6,boto==2.38.0,bpython==0.14.2,cffi==1.3.0,characteristic==14.3.0,coverage==4.0.1,cryptography==1.0.2,cssselect==0.9.1,curtsies==0.1.19,decorator==4.0.4,enum34==1.0.4,Flask==0.10.1,funcsigs==0.4,greenlet==0.4.9,idna==2.0,ipaddress==1.0.14,ipython==4.0.0,ipython-genutils==0.1.0,itsdangerous==0.24,Jinja2==2.8,jmespath==0.9.0,leveldb==0.193,lxml==3.4.4,MarkupSafe==0.23,mitmproxy==0.10.1,mock==1.3.0,ndg-httpsclient==0.4.0,netlib==0.10.1,parsel==1.0.1,path.py==8.1.2,pbr==1.8.1,pexpect==4.0.1,pickleshare==0.5,Pillow==2.9.0,ptyprocess==0.5,py==1.4.30,pyasn1==0.1.9,pyasn1-modules==0.0.8,pycparser==2.14,PyDispatcher==2.0.5,Pygments==2.0.2,pyOpenSSL==0.15.1,pytest==2.7.3,pytest-cov==2.2.0,pytest-twisted==1.5,queuelib==1.4.2,requests==2.8.1,Scrapy==1.1.0.dev1,service-identity==14.0.0,simplegeneric==0.8.1,six==1.10.0,testfixtures==4.3.3,traitlets==4.0.0,Twisted==
actionid: py27
msg: getenv
cmdargs: [local('/home/radar/projects/scrapy/.tox/py27/bin/pip'), 'install', '-rrequirements.txt', 'boto', 'Pillow != 3.0.0', 'leveldb', '-rtests/requirements.txt']
env: {'QT_QPA_PLATFORMTHEME': 'appmenu-qt5', 'XDG_GREETER_DATA_DIR': '/var/lib/lightdm-data/radar', 'GNOME_DESKTOP_SESSION_ID': 'this-is-deprecated', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'XDG_SEAT_PATH': '/org/freedesktop/DisplayManager/Seat0', 'QT_IM_MODULE': 'ibus', 'LOGNAME': 'radar', 'USER': 'radar', 'PATH': '/home/radar/projects/scrapy/.tox/py27/bin:/home/radar/anaconda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games', 'XDG_VTNR': '7', 'GNOME_KEYRING_CONTROL': '/run/user/1000/keyring-PAG3bi', 'DISPLAY': ':0', 'LANG': 'en_IN', 'TERM': 'xterm', 'SHELL': '/bin/bash', 'XDG_SESSION_PATH': '/org/freedesktop/DisplayManager/Session0', 'XAUTHORITY': '/home/radar/.Xauthority', 'LANGUAGE': 'en_IN:en', 'SESSION_MANAGER': 'local/radar-Inspiron-5420:@/tmp/.ICE-unix/1601,unix/radar-Ins
@darshanime
darshanime / scrapy stats
Created October 5, 2015 11:44
Stats for a scrapy run
{'downloader/exception_count': 217,
'downloader/exception_type_count/twisted.internet.error.DNSLookupError': 27,
'downloader/exception_type_count/twisted.internet.error.TimeoutError': 6,
'downloader/exception_type_count/twisted.web._newclient.ResponseNeverReceived': 184,
'downloader/request_bytes': 93555,
'downloader/request_count': 304,
'downloader/request_method_count/GET': 304,
'downloader/response_bytes': 1127213,
'downloader/response_count': 87,
'downloader/response_status_count/200': 8,