Skip to content

Instantly share code, notes, and snippets.

View 573's full-sized avatar

Daniel Kahlenberg 573

View GitHub Profile
@573
573 / .md
Last active June 15, 2016 19:31
Notes on 43 & 53

Core values http://thecommonwealth.org/sites/default/files/events/documents/CHOGM%202013%20Communique_0.pdf

Figure 6: importance of democracy; human rights; international peace and security; tolerance, respect and understanding; freedom of expression; separation of powers; rule of law; good governance; sustainable development; protecting the environment; access to health, education, fo od and shelter; gender equality; young people; the needs of small and vulnerable states; and the role of civil society. Heads emphasi s ed that these values were inter linked and mutually reinforcing.

Figure 43: Women and the Girl Child 43. Heads of Government agreed that the Commonwealth will continue to address the issue of child, early and forced marriage, giving due consideration to the domestic legislation of member countries and relevant international law . In this context, Heads noted the recent Commonwealth Roundtable on E arly and F orced M arriage and mandated the Commonwealth

@573
573 / CHANGELOG
Last active April 3, 2024 07:24
Raspberry Notes (Raspbian)
# 2016/9/12
Integrated the approach to generate raspbian-ua-netinst image and use that with systemd-nspawn emulation
# 2016/10/20
Added a decription how php was integrated with the nginx installation.
Added the domain name setup required for letsencrypt
@573
573 / *.md
Created January 15, 2016 15:41
oracle oci (windows: oracle client, vm: oracle host) with haskell
@573
573 / Main.hs
Last active June 15, 2016 19:27
takusen-oracle examples
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
module Main where
import Database.Oracle.Enumerator
main :: IO ()
main = loop 0 $ connect "system" "manager" "localhost/XE"
where loop i dbh = do
{
"metadata": {
"language": "haskell",
"name": "",
"signature": "sha256:735be6537d97c2ae96006ad36b402104aa3c71394079f9c000424191ecabdbf9"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
@573
573 / scapbook.lhs
Last active June 15, 2016 19:26
parse gcal and shift all dates for one fixed amount
http://stackoverflow.com/a/9049752/3320256
https://github.com/haskell/time/blob/master/lib/Data/Time/Format/Parse.hs
> import Text.Regex.Posix
> getAllTextMatches $ "20091112 20110304" =~ "[0-9]{8}" :: [String]
optional:
> [ c | let isGcalDate = makeRegex "([0-9])" :: Regex, c <- ['2','0','0','9','1','1','1','2'], match isGcalDate [c] ]
optional:
@573
573 / test.java
Last active June 15, 2016 19:26
testng parameters again
public class Test1 {
@Test@Parameters({"refresh.test.data"})
public void test1(String refreshTestData) {
new Test1Test(Boolean.valueOf(refreshTestData));
}
}
@573
573 / Dockerfile
Last active July 15, 2016 23:08
emulate raspi2 qemu (draft & buggy)
FROM ubuntu:latest
# http://www.atrixnet.com/compile-qemu-from-source-and-make-a-debian-package-with-checkinstall/
# Install bash
RUN apt-get update && apt-get install -y bash build-essential git libtool pkg-config intltool-debian checkinstall libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev libaio-dev libbluetooth-dev libbrlapi-dev libbz2-dev libcap-dev libcap-ng-dev libcurl4-gnutls-dev libgtk-3-dev libibverbs-dev libjpeg8-dev libncurses5-dev libnuma-dev librbd-dev librdmacm-dev libsasl2-dev libsdl1.2-dev libseccomp-dev libsnappy-dev libssh2-1-dev libvde-dev libvdeplug-dev libvte-2.90-dev libxen-dev liblzo2-dev valgrind xfslibs-dev
CMD ["/usr/bin/env", "bash", "-c", "tail", "-f", "/var/log/dmesg"]
@573
573 / snippet.sh
Created June 7, 2016 09:56
getopt odds
# we could also do
#getopt_results=`getopt -s bash -o s:d::t::u::w::h:: --long sql_script:,debug_level::,thin_url::,schema_user::,where_clause::,help:: -- "$@"`
# .. but the optional parameters those with :: suffixes instead of : needed to be
# specified exactly as --optional_parameter=value as --optional_parameter value
# will not work
getopt_results=`getopt -s bash -o s:r:t:u:w: --long sql_script:,remote:,thin_url:,schema_user:,where_clause: -- "$@"`
@573
573 / more_tags.xml
Created June 27, 2016 08:54
xml entities snippet
<more_tags>
<new_tag>
</new_tag>
</more_tags>