Skip to content

Instantly share code, notes, and snippets.

View zeljic's full-sized avatar
🎯
Focusing

Đorđe Zeljić zeljic

🎯
Focusing
View GitHub Profile
@zeljic
zeljic / downgrade-ssl.md
Created December 23, 2021 21:31
How to downgrade OpenSSL to TLSv=1

Create openssl.cnf and add:

openssl_conf = default_conf

[ default_conf ]
ssl_conf = ssl_sect

[ssl_sect]
system_default = system_default_sect
@zeljic
zeljic / team.py
Last active April 24, 2024 08:32
Randomize teams
import random
import sys
def main(names):
random.shuffle(names)
print('\033[93m' + 'Team 1: ' + ', '.join(names[:(len(names) // 2)]) + '\n\033[92mTeam 2: ' + ', '.join(names[(len(names) // 2):]) + '\033[0m')
if __name__ == '__main__':
main(sys.argv[1:])
@zeljic
zeljic / build_sqlite3_lib.md
Last active November 25, 2024 23:43
Build SQLite3 .lib file on windows

How to build SQLite3 .lib file on Windows 10

  1. Download source from source

    For example: source https://www.sqlite.org/2023/sqlite-amalgamation-3430100.zip

  2. Download binary from binary

    For example: binary https://www.sqlite.org/2023/sqlite-dll-win64-x64-3430100.zip

  3. Extract both archives to the same directory

@zeljic
zeljic / border-example.xml
Created June 5, 2017 12:03
FOP 2.2 - Border Example
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="default-page" page-height="8.2604in" page-width="11.6875in" margin-left="0.7in" margin-right="0.7in">
<fo:region-body margin-top="0.75in" margin-bottom="0.75in"/>
<fo:region-before extent="0.75in"/>
<fo:region-after extent="0.75in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="default-page" format="1" initial-page-number="1">
@zeljic
zeljic / pom.reporting.xml
Last active December 18, 2017 10:15
Enable Maven Reporting / PMD and FindBugs
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.7</version>
<configuration>
<sourceEncoding>utf-8</sourceEncoding>
<language>java</language>
<verbose>true</verbose>
@zeljic
zeljic / team.py
Created December 8, 2016 10:50
Team Builder
import random
import sys
def main(names):
random.shuffle(names)
print '\033[93m' + 'Team 1: ' + ', '.join(names[:(len(names) / 2)]) + '\n\033[92mTeam 2: ' + ', '.join(names[(len(names) / 2):]) + '\033[0m'
if __name__ == '__main__':
main(sys.argv[1:])
@zeljic
zeljic / compare.java
Created November 29, 2016 18:39
Compare Basic Version Strings In Java
private int compare(String vx, String vy)
{
String[] vxL = vx.split("\\.");
String[] vyL = vy.split("\\.");
final int xSize = vxL.length, ySize = vyL.length, size = Math.max(xSize, ySize);
Integer iVx, iVy;
int i, diff;
@zeljic
zeljic / httpd-vhosts.conf
Created November 27, 2016 21:03
Windows Apache Virtual Host for Laravel 5.3
<VirtualHost *:80>
ServerAdmin admin@admin.com
DocumentRoot "__LARAVEL_PUBLIC_DIR__"
ServerName dev
ErrorLog "logs/dev-error.log"
CustomLog "logs/dev-access.log" common
<Directory "__LARAVEL_PUBLIC_DIR__">
Options Indexes FollowSymLinks
AllowOverride All
@zeljic
zeljic / CleanCode.xml
Last active November 18, 2016 12:45
PHPStorm CodeStyle - CleanCode
<code_scheme name="CleanCode">
<codeStyleSettings language="CSS">
<indentOptions>
<option name="USE_TAB_CHARACTER" value="true"/>
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="HTML">
<option name="RIGHT_MARGIN" value="500"/>
<indentOptions>
<option name="USE_TAB_CHARACTER" value="true"/>
zeljic@ironhills:~/dev/lizzard $ conan install --build=missing
Requirements
zlib/1.2.8@lasote/stable
Packages
zlib/1.2.8@lasote/stable:5111d9c5cf2ac03a5fd63ec5f9092e3da8fdbe78
Installing requirements
zlib/1.2.8@lasote/stable: Installing package 5111d9c5cf2ac03a5fd63ec5f9092e3da8fdbe78
zlib/1.2.8@lasote/stable: Package not installed