This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.function.Function; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class Replacer { | |
public static void main(String[] args) { | |
Replacer replacer = new Replacer(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int is_binary_palindrome(int x){ | |
int b = 0, _x = x; | |
while (_x) { | |
b <<= 1; | |
b |= _x&1; | |
_x >>= 1; | |
} | |
return x==b; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%%------------------------------------------------------------------- | |
%%% @author fhrenic | |
%%% @copyright (C) 2017, FER | |
%%% @doc | |
%%% | |
%%% @end | |
%%% Created : 27. Mar 2017 00:01 | |
%%%------------------------------------------------------------------- | |
-module(rbtree). | |
-author("fhrenic"). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
username: [email protected] | |
password: ********** | |
[smtp] | |
server: smtp.office365.com | |
port: 587 | |
tls: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hruntek; | |
/** | |
* Union find with path compression and weighted union | |
* O(log*N) operations | |
*/ | |
class UnionFind { | |
/** | |
* Node's id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Open Terminal Here | |
Written by Brian Schlining | |
source: http://hohonuuli.blogspot.hr/2016/02/iterm2-version-3-open-iterm-here-script.html | |
*) | |
property debug : false | |
-- when the toolbar script icon is clicked | |
-- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function _die($msg) | |
{ | |
echo "<html><body><h1>$msg</h1><a href='/'>Početna stranica</a></body></html>"; | |
die; | |
} | |
if (!isset($_SERVER['REQUEST_METHOD'])) { | |
_die('Nece ici'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package parallel; | |
import java.util.Collection; | |
import java.util.Observable; | |
import java.util.Observer; | |
import java.util.concurrent.*; | |
import java.util.concurrent.atomic.AtomicInteger; | |
/** | |
* This class is used to execute tasks in parallel. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
APPNAME= | |
# tomcat conf | |
TADM_USER=admin | |
TADM_PASS=admin | |
# derby conf | |
DERBY_DB=/home/vagrant/database |