Skip to content

Instantly share code, notes, and snippets.

View clintmod's full-sized avatar

Clint Mod clintmod

View GitHub Profile
@clintmod
clintmod / keybase.md
Created April 13, 2023 23:17
keybase.md

Keybase proof

I hereby claim:

  • I am clintmod on github.
  • I am clintmod (https://keybase.io/clintmod) on keybase.
  • I have a public key whose fingerprint is 168C 87D3 71BB E006 E06D D57B D2C4 666A 6F5E 0509

To claim this, I am signing this object:

[tool.poetry]
name = "poetry-bug"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
[tool.poetry.dependencies]
python = "^3.6"
[tool.poetry.dev-dependencies]
@clintmod
clintmod / redis_remove_keys_older_than_x_days.rb
Created June 14, 2019 02:02
Removes keys older than X days
#!/usr/bin/env ruby
require 'redis'
pattern = ARGV[1] || "*"
days = ARGV[0].to_i > 0 ? ARGV[0].to_i : 30
MAX_AGE = days * 60 * 60 * 24 # convert to seconds
redis = Redis.new
cursor = 0
loop do
cursor, keys = redis.scan cursor, :match => pattern
@clintmod
clintmod / addUser
Created February 12, 2018 15:03 — forked from wataru420/addUser
Jenkins init script for centos
/usr/sbin/groupadd -g 30119 jenkins
/usr/sbin/useradd -u 30119 -g jenkins jenkins
mkdir /home/jenkins
chown -R jenkins. /home/jenkins
@clintmod
clintmod / cloudSettings
Last active November 1, 2019 04:22
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-01-01T00:14:37.573Z","extensionVersion":"v2.8.7"}
@clintmod
clintmod / cloudSettings
Created August 27, 2017 16:09
Visual Studio Code Settings Sync Gist
{"lastUpload":"2017-08-27T16:09:46.707Z","extensionVersion":"v2.8.3"}
@clintmod
clintmod / git-checkout-every-branch.sh
Created August 8, 2014 05:43
git checkout every remote branch (so you can push them all to a different repo) using git push newRepo --all
for branch in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin | grep -v HEAD | sed 's:^origin/::'); do git checkout "$branch"; done
var fs = require ('fs')
,xmldoc = require('xmldoc')
var xmlFileName = __dirname + '/sample.xml';
fs.readFile(xmlFileName, {encoding:'utf8'}, fs_complete);
function fs_complete(err, data) {
if (err)
throw err;
parseXml(data, this);