Skip to content

Instantly share code, notes, and snippets.

Avatar
😇

Joris Vanhecke vanhecke

😇
View GitHub Profile
View captcha.cr
require "digest/md5"
module Captcha
def get_text(secret, random, alphabet = "abcdefghijklmnopqrstuvwxyz", character_count = 6)
if character_count < 1 || character_count > 16
raise "Character count of #{character_count} is outside the range of 1-16"
end
input = "#{secret}#{random}"
View boxstarter1.txt
Disable-GameBarTips
Disable-UAC
Disable-BingSearch
Enable-MicrosoftUpdate
cinst ccleaner
cinst ccenhancer
cinst googlechrome
cinst firefox
cinst chromedriver
@vanhecke
vanhecke / convert.rb
Last active Jun 19, 2017
Convert .nessus file(s) to a CSV using mephux/ruby-nessus.
View convert.rb
require 'rubygems'
require 'nessus'
require 'csv'
csv = CSV.open("results.csv", "w", force_quotes: true)
csv << ['Plugin ID','CVE','CVSS','Risk','Host','Protocol','Port','Name','Synopsis','Description','Solution','See Also','Plugin Output']
Dir.glob('/PATH_TO_FILE(S)/*.nessus').each do |nessus_file|
Nessus::Parse.new(nessus_file) do |scan|
@vanhecke
vanhecke / notify_sickrage.bat
Last active Mar 5, 2017
NZBGet post-processor that notifies SickRage of failure/success.
View notify_sickrage.bat
@echo off
goto start:
########################################
### NZBGET POST-PROCESSING SCRIPT ###
# SickRage notifier
#
# This simple script will notify sickrage of completed downloads
################################
@vanhecke
vanhecke / .gitlab-ci.yml
Created Jul 11, 2016
Using a Crystal app on Gitlab's free CI service
View .gitlab-ci.yml
image: jhass/crystal-build-x86_64
before_script:
- apt-get install redis-server -y
- service redis-server start
- crystal deps
- crystal run scripts/seed.cr
spec:
script:
View doas_and_node_fail
# cat /etc/doas.conf
# Users
permit nopass joris cmd openup
permit joris cmd reboot
# Daemons - Startup
permit nopass root as _teleirc cmd /usr/local/bin/teleirc
permit nopass root as joris cmd /usr/local/bin/teleirc
View keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

View httpkek.cr
# Works fine in browser and using wget.
# Using curl:
# ⊨ curl -v http://127.0.0.1:8080/ ~
# * Hostname was NOT found in DNS cache
# * Trying 127.0.0.1...
# * Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
# > GET / HTTP/1.1
# > User-Agent: curl/7.37.1
# > Host: 127.0.0.1:8080
# > Accept: */*
@vanhecke
vanhecke / AC3toACC.bat
Created Dec 13, 2014
Converts all MKV's audio from ac3 to aac. For playing scene releases on iOS.
View AC3toACC.bat
@echo off
rem
rem
rem
rem
rem
rem START CONFIGURATION
cd "C:\Users\Joris\Videos\Converted"
set mkvextract="C:\Program Files\MKVToolNix\mkvextract.exe"
View gist:944e786488170e373f97
//Skipped some code from this part:
data_length = JSON.parse(data).length
var total_data = new Array();
total_data.push(JSON.parse(data));
///
// What does this .concat.apply do?
var merged = [];
merged = merged.concat.apply(merged, total_data);
success(merged);