Skip to content

Instantly share code, notes, and snippets.

View kjellski's full-sized avatar
🤓
learning every day...

Kjellski kjellski

🤓
learning every day...
View GitHub Profile
@kjellski
kjellski / install.sh
Created October 17, 2012 14:40 — forked from criminy/install.sh
A pax-run profile for karaf 2.3.0
mvn install:install-file -DgroupId=org.ops4j.pax.runner.profiles -DartifactId=karaf.shell -Dversion=2.3.0 -Dfile=karaf.shell.composite -Dpackaging=composite
@kjellski
kjellski / install.sh
Last active December 13, 2015 19:18 — forked from padcom/install.sh
#!/bin/bash
#------------------------------------------------------------------------------
# SETTINGS
#------------------------------------------------------------------------------
MYSQL_ROOT_PASSWORD=password
MYSQL_GITORIOUS_PASSWORD=password
GITORIOUS_HOST=gitorious
SYSADMIN=sysadmin
This file has been truncated, but you can view the full file.
'use strict';
var COMPILED = !0, goog = goog || {};
goog.global = this;
goog.DEBUG = !1;
goog.LOCALE = "en";
goog.provide = function (a) {
if (!COMPILED) {
if (goog.isProvided_(a))
throw Error('Namespace "' + a + '" already declared.');
delete goog.implicitNamespaces_[a];
@kjellski
kjellski / install.sh
Last active December 16, 2015 04:18 — forked from padcom/install.sh
#!/bin/bash
#------------------------------------------------------------------------------
# SETTINGS
#------------------------------------------------------------------------------
MYSQL_ROOT_PASSWORD=password
MYSQL_GITORIOUS_PASSWORD=password
GITORIOUS_HOST=gitorious
SYSADMIN=sysadmin
object FizzBuzz extends App {
val nones = Stream.continually(None)
val fizzes: Stream[Option[String]] = nones.take(2) ++ Some("Fizz") #:: fizzes
val buzzes: Stream[Option[String]] = nones.take(4) ++ Some("Buzz") #:: buzzes
for (((fizz, buzz), n) <- fizzes zip buzzes zip (1 to 100)) {
println(fizz.map(_ + buzz.getOrElse("")).orElse(buzz).getOrElse(n))
}
#!/bin/bash
# Description: Using Docker (requires docker to be installed http://www.docker.io/gettingstarted/ ), spawn a postgresql instance and a dynamically configured treeio instance
# Author: Adam Awan
# Email: adam@tree.io
# Create a PostgreSQL Instance
echo "Retrieving jpetazzo/pglite PostgreSQL Container..."
docker pull jpetazzo/pglite
echo "Running jpetazzo/pglite PostgreSQL Container..."
PGID=$(docker run -d jpetazzo/pglite)
<Project DefaultTargets="CopyOutputs;DeployService" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<!-- These settings control what the service's name, description etc appear in services.msc task panel. -->
<PropertyGroup Label="ServiceMetaData">
<ServiceName>ShinyNewService</ServiceName>
<ServiceDisplayName>Shiny New Service</ServiceDisplayName>
<ServiceDescription>A shiny new service, that changes the world for the greater good.</ServiceDescription>
</PropertyGroup>
<Choose>
--tree-filter 'rm -rf *.suo *.user *.sln.docstates [Dd]ebug [Dd]ebugPublic [Rr]elease x64 build bld [Bb]in [Oo]bj [Tt]est[Rr]esult* [Bb]uild[Ll]og.* *.VisualState.xml TestResult.xml *_i.c *_p.c *_i.h *.ilk *.meta *.obj *.pch *.pdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *.log *.vspscc *.vssscc .builds *.pidb *.svclog *.scc _Chutzpah* ipch *.aps *.ncb *.opensdf *.sdf *.cachefile *.psess *.vsp *.vspx \$tf *.gpState _ReSharper* *.[Rr]e[Ss]harper *.DotSettings.user .JustCode _TeamCity* *.dotCover *.ncrunch* _NCrunch_* .*crunch*.local.xml *.mm.* AutoTest.Net [Ee]xpress DocProject/buildhelp DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html publish *.Publish.xml *.azurePubxml csx *.build.csdef AppPackages sql *.Cache ClientBin [Ss]tyle[Cc]op.* ~\$* *~ *.dbmdl *.dbproj.schemaview *.[Pp]ublish.xml *.pfx *.publishsettings Generated_Code _UpgradeReport_Files Backup* UpgradeLog*.XML UpgradeLog*.htm Ap
// Place user-specific overrides in this file, to ensure they're preserved
// when upgrading
{
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"]
}
/// <summary>
/// Executes a particular piece of code based on the type of the argument.
/// </summary>
public static class TypeSwitch
{
/// <summary>
/// Executes a particular piece of code based on the type of the argument.
/// </summary>
/// <typeparam name="TSource">The argument's type.</typeparam>
/// <param name="value">The switch argument.</param>