Skip to content

Instantly share code, notes, and snippets.

View wankdanker's full-sized avatar

Dan VerWeire wankdanker

View GitHub Profile
@wankdanker
wankdanker / install.md
Last active August 29, 2015 14:19
Installing kdev-qmljs (JavaScript/Nodejs Code Completion) for kdevelop on Ubuntu 14.04

This is what I had to do in order to get code completion for node.js to work with kdevelop on Ubuntu 14.04.

I have not run through these steps again on a fresh system so, I'm not sure if I'm missing anything here. If you find something missing please let me know.

#enable the backports repository to get kdevelop 4.7
sudo apt-add-repository ppa:kubuntu-ppa/backports
sudo apt-get update

#you may be able to skip this step if you want, but I did it.
@wankdanker
wankdanker / README.md
Last active December 14, 2015 16:38
Generate a mac address based on FQDN

Install

curl https://gist.githubusercontent.com/wankdanker/2f676cc85f52fd471567/raw -o /usr/local/bin/gen-mac; chmod 755 /usr/local/bin/gen-mac
@wankdanker
wankdanker / README.md
Last active October 31, 2019 14:05
Walmart Drop Ship Vendor Supplier DSV Carrier Method Codes

Walmart Drop Ship Vendor Supplier DSV Carrier Method Codes

As part of the Walmart DSV API, there are carrier method codes in the order xml, but the only documentation I found was in this PDF. That document is referenced from Supplier Help.

That PDF file is of course not easily consumable and it was a wicked pain in the ass to get the data out of there. But, it's done now, and if you happen to find this file I hope I saved you some time.

@wankdanker
wankdanker / mkunpriv.sh
Last active December 26, 2023 19:43
A script to make Proxmox LXC Containers unprivileged
#!/bin/bash
##
## Warning: do not use this unless you understand and agree with what it does
##
## Based on: https://forum.proxmox.com/threads/convert-privileged-to-unprivileged-container.31066/#post-261883
##
## NOT HANDLED
## * multiple disks
## * if there are backup/snapshot references in the lxc/$vmid.conf the unprivileged:1 will be added to the end of the file and in a backup config not in the active config, that can break the first boot
## * setuid and setgid permissions are not retained
@wankdanker
wankdanker / happend.js
Last active September 26, 2022 12:01
happend LUA script for redis
const Redis = require('ioredis')
const redis = new Redis()
redis.defineCommand("happend", {
numberOfKeys: 2,
lua: `
local current = redis.call("hget", KEYS[1], KEYS[2])
if current == nil or current == false then
current = ARGV[1]
else