Skip to content

Instantly share code, notes, and snippets.

View aleksandara's full-sized avatar

Aleksandar Antok aleksandara

View GitHub Profile
@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
@aleksandara
aleksandara / gist:5176859
Created March 16, 2013 15:22
Stop Smoking Benefits Timetable
Within ...
• 20 minutes - Your blood pressure, pulse rate and the temperature of your hands and feet have returned to normal.
• 8 hours - Remaining nicotine in your bloodstream will have fallen to 6.25% of normal peak daily levels, a 93.75% reduction.
• 12 hours - Your blood oxygen level will have increased to normal and carbon monoxide levels will have dropped to normal.
• 24 hours - Anxieties have peaked in intensity and within two weeks should return to near pre-cessation levels.
• 48 hours - Damaged nerve endings have started to regrow and your sense of smell and taste are beginning to return to normal. Cessation anger and irritability will have peaked.
• 72 hours - Your entire body will test 100% nicotine-free and over 90% of all nicotine metabolites (the chemicals it breaks down into) will now have passed from your body via your urine. Symptoms of chemical withdrawal have peaked in intensity, including restlessness. The number of cue induced crave episodes experienced during any quitting day will pea
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
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.
/*
* 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
@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/
@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 / 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 / obsidian.js
Created January 4, 2022 12:30
Obsidian Bookmarklet
javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "Obsidian";
/* Optional folder name such as "Clippings/" */