Skip to content

Instantly share code, notes, and snippets.

View GlasFrost's full-sized avatar

Luis Hartmann GlasFrost

View GitHub Profile
@GlasFrost
GlasFrost / PowerShellExperiment.ps1
Last active June 28, 2017 18:20
Learning how to PowerShell
# This PowerShell script was written by Luis Hartmann 2017.
# Use at own risk.
# Intended for educational purposes only.
# Includes code that was borrowed and adjusted from http://www.tomsitpro.com/articles/powershell-interactive-menu,2-961.html
function showMainmenu () {
param (
[string]$Title = 'Main Menu'
)
#cls
@GlasFrost
GlasFrost / RandomOutput.java
Created November 13, 2015 15:14
Generates random output usable for design purposes. DO NOT USE FOR CRYPTO! YOU HAVE BEEN WARNED!
/*
* Copyright (c) 2015 Luis Hartmann
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@GlasFrost
GlasFrost / uuidgen.js
Created November 10, 2015 23:42
uuidgen stolen by someone else, because there are not enough copies of this line of code :P
function uuidgen(){
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a,b){return b = Math.random()*16, (a=="y"? b&3|8: b|0).toString(16)});
}
@GlasFrost
GlasFrost / data_v04.sql
Last active August 29, 2015 14:16
Some database table development
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 25, 2015 at 10:22
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
@GlasFrost
GlasFrost / monsh.sh
Created February 12, 2015 18:20
A monitored bash session using the script command
#!/bin/bash
script -a -q -f -c "/bin/bash -i" "/home/public/monsh/$(date +%Y-%m-%dT%H-%M-%S)_$(whoami)_$$.scr"
@GlasFrost
GlasFrost / ascii.txt
Created January 17, 2015 17:46
The "default" printable ASCII chars
ASCII chars:
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
^ mind the space as it is the first printable ASCII char!
@GlasFrost
GlasFrost / GlasfrostUtils.java
Created December 26, 2014 13:48
Helper class for various tasks
/*
* Copyright (c) 2014 Luis Hartmann
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@GlasFrost
GlasFrost / test.md
Created August 24, 2014 14:46
Markdown tests

Heading

Normal text

sub heading

  • first
  • second
@GlasFrost
GlasFrost / uTox-starter.sh
Created August 20, 2014 12:13
Always run the latest version (nightly) of uTox (i686) (binary is stored in ~/Downloads) (requires unix-like os) (tested on kubuntu 14.04)
#!/bin/bash
cd ~/Downloads
curl -v -L https://jenkins.libtoxcore.so/job/uTox_linux_i686/lastSuccessfulBuild/artifact/utox/utox_linux_i686.tar.xz | tar xJf -
./utox