Skip to content

Instantly share code, notes, and snippets.

View ognjenkuljic's full-sized avatar

Ognjen Kuljic ognjenkuljic

View GitHub Profile
@ognjenkuljic
ognjenkuljic / keybase.md
Created September 22, 2021 08:27
keybase.md

Keybase proof

I hereby claim:

  • I am ognjenkuljic on github.
  • I am ndklab (https://keybase.io/ndklab) on keybase.
  • I have a public key ASBOsF4rA_LMj1qagZadzeJ46c1Vr5uRiaV5pHYorni0iwo

To claim this, I am signing this object:

@ognjenkuljic
ognjenkuljic / countries.php
Created November 21, 2017 12:08 — forked from josephilipraja/countries.php
List of Countries with Country code & Telephone (Dial) Code as a PHP Array. Bonus: PHP function to list all Countries as HTML Select Tag Options with their 2 character Country code as values
<?php
$countryArray = array(
'AD'=>array('name'=>'ANDORRA','code'=>'376'),
'AE'=>array('name'=>'UNITED ARAB EMIRATES','code'=>'971'),
'AF'=>array('name'=>'AFGHANISTAN','code'=>'93'),
'AG'=>array('name'=>'ANTIGUA AND BARBUDA','code'=>'1268'),
'AI'=>array('name'=>'ANGUILLA','code'=>'1264'),
'AL'=>array('name'=>'ALBANIA','code'=>'355'),
'AM'=>array('name'=>'ARMENIA','code'=>'374'),
'AN'=>array('name'=>'NETHERLANDS ANTILLES','code'=>'599'),
@ognjenkuljic
ognjenkuljic / calendar.twig
Created April 18, 2017 20:55 — forked from aknosis/calendar.twig
Table based calendar only using Twig
{#
time can be any string acceptable by http://www.php.net/strtotime, the
template will output that time's month.
If you don't want to pass in a date you can set time like this:
{% set time = "now"|date("U") %}
{% set time = "December 2012"|date("U") %}
How ever you want to output items onto the calendar is a different issue,
but I'd assume pushing everything into an array numerically indexed by that day:
@ognjenkuljic
ognjenkuljic / nginx.conf
Created March 16, 2017 13:18 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@ognjenkuljic
ognjenkuljic / git-log2json.sh
Created February 1, 2017 16:06 — forked from textarcana/git-log2json.sh
Convert Git logs to JSON. The first script (git-log2json.sh) is all you need, the other two files contain only optional bonus features :)
#!/usr/bin/env bash
# Use this one-liner to produce a JSON literal from the Git log:
git log \
--pretty=format:'{%n "commit": "%H",%n "author": "%aN <%aE>",%n "date": "%ad",%n "message": "%f"%n},' \
$@ | \
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \
perl -pe 's/},]/}]/'
* {
position: absolute;
margin: 0;
padding: 0;
display:block;
}