Skip to content

Instantly share code, notes, and snippets.

View mcnemesis's full-sized avatar
💭
DNAP hackathons on days with good weather ;-)

Nemesis Fixx Da JWL mcnemesis

💭
DNAP hackathons on days with good weather ;-)
View GitHub Profile
@mcnemesis
mcnemesis / 350_exim4-config_virtual_aliases
Created July 4, 2013 14:43
Defining an Exim4 Router to allow Exim to route mails for virtual domains using custom virtual domains aliases.
#####################################################
# router/350_exim4-config_virtual_aliases
#####################################################
#---------------------------
# This router is added so that we can use this server for multiple domains
# And also be able to define custom aliases for each of these domains...
# NOTE : this router is placed before the system_aliases router so that virtual domain
# routing takes precedence over system_aliases
#----------------------------
@mcnemesis
mcnemesis / cups_cheetsheet.txt
Last active December 20, 2015 11:00
A CUPS Cheetsheet (under development) Originally based on the blog post: http://www.mybinarylife.net/2012/06/linux-cups-terminal-printer-quick.html
Linux CUPS terminal printer quick cheatsheet
=============================================
** Adding a new printer without a PPD:
lpadmin -p printer_name -E -v socket://192.168.1.9:9100
** Finding an existing PPD for your printer if required:
lpinfo --make-and-model 'LaserJet 3390' -m
@mcnemesis
mcnemesis / DataDictionary.cs
Created August 16, 2013 15:39
A Simple, 1-class non-obtrusive No-SQL DB for Windows Phone 8, Windows Store + (RT)
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.Storage;
namespace MyCHILD
@mcnemesis
mcnemesis / ImportADUsersIntoLync.ps1
Created December 21, 2015 10:40
How to automatically import all (or some) AD users into Lync
Get-ADUser -filter {name -like "*"} | Select SamAccountname | Foreach { $username=$_.SamAccountname; enable-csuser -identity REA\${username} -RegistrarPool YOUR.POOL.FQDN -SipAddressType EmailAddress }
@mcnemesis
mcnemesis / CustomKeyGroup.cs
Created August 27, 2013 08:19
This class allows us to be able to create custom groups, with custom keys, that can be easily consumed by jump lists and used to group items in long list selector controls for Windows Phone 8. Jump-Style Yey!
using System;
using System.Collections.Generic;
using System.Linq;
namespace LongListSelectorUtils
{
/// <summary>
/// This class allows us to be able to create custom groups, with custom keys,
/// that can be easily consumed by jumplists and used to group items in longlist selector controls.
///
@mcnemesis
mcnemesis / responsive_html_table.html
Created October 2, 2013 15:25
An ingenious way to to hack the ultimate responsive HTML table (using Bootstrap). Instead of one monstrous TABLE, we creatively use smaller tables.
<div class="row panel"> <!-- panel class plays a big role in concealing our trick when it comes to painting the table -->
<div class="col-md-2">
<table class="table">
<thead>
<tr>
<th>CATEGORY</th>
</tr>
</thead>
<tbody>
<tr>
@mcnemesis
mcnemesis / Install_GLM.sh
Created January 28, 2014 15:11
Basic script (may not port to all *.nix systems though) to install glm (a header only lib for advanced OpenGL Mathematics) - am testing on OpenSuse 12.3
#!/usr/bin/sh
#I use axel, but you might as well use wget
#and you might wish to grab your own uri in case this one is broken...
rm glm*.zip
axel http://downloads.sourceforge.net/project/ogl-math/glm-0.9.5.1/glm-0.9.5.1.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fogl-math%2Ffiles%2F&ts=1390921576&use_mirror=garr
7z x glm*.zip && cd glm && sudo cp -r glm /usr/include/
#if all went well, you are ready to use GLM (e.g you may now proceed to ./configure-make gource :-)
http://www.advance-africa.com/
http://www.scholarshipforafricans.com/
http://scholarship-positions.com/
http://allscholarships.info/
http://www.scholars4dev.com/
------ OTHERS ------
1. Australia Award Scholarship : http://australiaawardsindo.or.id
@mcnemesis
mcnemesis / run_all_sql_scripts_in_dir.bat
Created August 5, 2016 06:20
Using Windows Batch Scripting, and the SQLCMD utility, this little script will run, recursively, all the MS SQL scripts under a given directory... with options for setting DB access parameters and more.
@ECHO OFF
ECHO ***********************
ECHO Remember Batch sCripts?
ECHO Good ol days... but, right now, we got work to do ;-)
ECHO ***********************
ECHO SCRIPT: run_all_sql_in_dir.bat
ECHO SYNTAX: run_all_sql_in_dir [DIR] [HOST] [SERVER] [DBNAME] [USER] [PASSWORD]
ECHO Purpose: should be obvious by now... checks the DIR, and using the connection params, executes all SQL scripts found in that dir, against the specified DB
ECHO Uses some convinient defaults... check the source-code of this script!