Skip to content

Instantly share code, notes, and snippets.

@rgl
rgl / Vagrantfile
Created August 26, 2015 07:22
Vagrantfile to install a ready to use Ubuntu VM
# -*- mode: ruby -*-
# vi: set ft=ruby :
$vagrant_provision_script = Vagrant.configure(2) do |config|
config.vm.box = "ubuntu-15.04-amd64"
config.vm.hostname = "influxdb"
config.vm.network "private_network", ip: "10.10.10.2"
@rgl
rgl / PurgePop3Account.cs
Created March 4, 2014 11:34
Purge a POP3 account
using OpenPop.Pop3; // from http://www.nuget.org/packages/OpenPop.NET/
using System;
namespace PurgePop3Account
{
class Program
{
static void Main(string[] args)
{
// use the pop3s scheme for SSL connection (recommended).
@rgl
rgl / CheckJce.java
Last active August 29, 2015 14:04
try to use a non-limited key size to see whether the Java Cryptography Extension (JCE) Unlimited Strength is correctly installed. without it the maximum key size are limited to 128-bit.
package CheckJce;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
public class CheckJce {
public static void main(String[] args) throws Exception {
String message = "Java Cryptography Extension (JCE) Unlimited Strength is correctly installed!";
@rgl
rgl / SetExecutableIcon.cs
Last active August 29, 2015 14:04
SetExecutableIcon
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Vestris.ResourceLib;
namespace SetExecutableIcon
{
class Program
{
@rgl
rgl / designer.html
Created August 23, 2014 12:07
designer
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<link rel="import" href="../topeka-elements/topeka-categories.html">
<link rel="import" href="../topeka-elements/topeka-category.html">
<link rel="import" href="../topeka-elements/avatars.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../topeka-elements/topeka-leaderboard.html">
@rgl
rgl / run-as-admin.reg
Created August 25, 2014 09:57
Configure Windows to run executable as Administrator
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\Windows\\System32\\cmd.exe"="RUNASADMIN"
"C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\devenv.exe"="RUNASADMIN"
"C:\\Program Files\\ConEmu\\ConEmu64.exe"="RUNASADMIN"
@rgl
rgl / Program.cs
Last active August 29, 2015 14:09
nesper group by prev
using com.espertech.esper.client;
using System;
using System.Threading;
namespace UseNesper
{
class PerformanceCounter
{
public string ServerName { get; set; }
public double Value { get; set; }
00:37:06,120
When we're headed toward an outcome that's too horrible to face...
That's when we go looking for a second opinion.
And sometimes...
The answer we get just confirms our worst fears.
00:37:52,427 --> 00:37:53,378
Peace...
isn't a permanent state.
It exists in moments...
fleeting...
Chinaski at the end of the Factotum movie:
If you are going to try,
go all the way.
Otherwise don't even start.
This could mean losing girlfriends,
wives, relatives, jobs.