Skip to content

Instantly share code, notes, and snippets.

@Ox0400
Ox0400 / findLongRunningOp.js
Created Sep 14, 2018 — forked from kylemclaren/findLongRunningOp.js
Find and (safely) kill long running MongoDB ops
View findLongRunningOp.js
db.currentOp().inprog.forEach(
function(op) {
if(op.secs_running > 5) printjson(op);
}
)
@vovimayhem
vovimayhem / dev.Dockerfile
Created Aug 18, 2017
PhantomJS on Alpine (Docker)
View dev.Dockerfile
# 1: Use node 6 as base:
FROM node:6-alpine
# 2: Download+Install PhantomJS, as the npm package 'phantomjs-prebuilt' won't work on alpine!
# See https://github.com/dustinblackman/phantomized
RUN set -ex \
&& apk add --no-cache --virtual .build-deps ca-certificates openssl \
&& wget -qO- "https://github.com/dustinblackman/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz" | tar xz -C / \
&& npm install -g phantomjs \
&& apk del .build-deps
View text_to_image.py
# -*- coding: utf-8 -*-
#
# Author: oldj
# Email: oldj.wu@gmail.com
# Blog: http://oldj.net
#
import os
import re
import StringIO
View usbreset.c
/* usbreset -- send a USB port reset to a USB device
*
* Compile using: gcc -o usbreset usbreset.c
*
*
* */
@pksunkara
pksunkara / config
Last active Jun 11, 2021
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
View config
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
[sendemail]
smtpencryption = tls