Skip to content

Instantly share code, notes, and snippets.

View aleksandara's full-sized avatar

Aleksandar Antok aleksandara

View GitHub Profile
@aleksandara
aleksandara / microk8s.yaml
Created May 31, 2020 18:08 — forked from dmarkey/microk8s.yaml
Microk8s Cloud Init
runcmd:
- "snap install microk8s --classic"
- "echo '-H tcp://0.0.0.0' >> /var/snap/microk8s/current/args/dockerd"
- "systemctl restart snap.microk8s.daemon-docker.service"
- "ln -s /var/snap/microk8s/current/docker.sock /var/run/docker.sock"
- "/snap/bin/microk8s.start"
- "/snap/bin/microk8s.status --wait-ready"
- "/snap/bin/microk8s.enable dns storage ingress"
- "/snap/bin/microk8s.status --wait-ready"
- "iptables -P FORWARD ACCEPT"
@aleksandara
aleksandara / ClassGenerator.sql
Created October 28, 2019 15:33
Generate C# class from database table
--from SO: http://stackoverflow.com/questions/5873170/generate-class-from-database-table
declare @TableName sysname = 'TableName'
declare @Result varchar(max) = 'public class ' + @TableName + '
{'
select @Result = @Result + '
public ' + ColumnType + NullableSign + ' ' + ColumnName + ' { get; set; }
'
from
@aleksandara
aleksandara / dotnetlayout.md
Created November 4, 2018 09:34 — forked from davidfowl/dotnetlayout.md
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
/*
* picked from http://stackoverflow.com/questions/5186441/javascript-drag-and-drop-for-touch-devices
*
*/
function touchHandler(event)
{
// trick to add support for touch event to elements/widgets that do not support it
// by convetting convert touchevents into mouseevents
// only apply this trick to ui-draggable elements
import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import akka.actor.UntypedActor;
import akka.event.japi.LookupEventBus;
/**
* Java example showing the usage of a Akka {@link akka.event.japi.LookupEventBus}.
* The case below shows publishing events to two different "channels". A channel is just
* a string value carried along with the Event.
package com.minosiants
import akka.event.ActorEventBus
import akka.event.LookupClassification
import akka.actor.ActorSystem
import akka.actor.Props
import akka.actor.Actor
import java.util.Date
import java.util.UUID
@aleksandara
aleksandara / fontfix.patch
Created June 21, 2012 03:27 — forked from trustin/fontfix.patch
OpenJDK 7 font rendering patch for Linux (cd openjdk/jdk; patch -p1 < fontfix.patch)
diff -r 96a023de3ddf make/sun/font/Makefile
--- a/make/sun/font/Makefile Wed Jun 06 18:39:46 2012 -0700
+++ b/make/sun/font/Makefile Fri Jun 08 12:52:01 2012 +0900
@@ -128,7 +128,7 @@
ifeq ($(USING_SYSTEM_FT_LIB), false)
FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX).6
endif
- OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype
+ OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype -lfontconfig
endif