# creates a new chain, blacklistdrop, which will log, update ip in the BLACKLIST and drop packet
sudo iptables -N blacklistdrop
sudo iptables -A blacklistdrop -j LOG --log-prefix "Adding to BLACKLIST: "
sudo iptables -A blacklistdrop -m recent --name BLACKLIST --set -j DROP
# A packet is from a host that has been seen in BLACKLIST in the last 120 seconds, the this rule updates the BLACKLIST and the packet is dropped.
sudo iptables -A INPUT -m recent --name BLACKLIST --update --seconds 120 -j DROP
# If a packet is from a host that is already in ZAA_URL list and exceeding limits the this rule forwards packet to blacklistdrop list to be blacklisted and then to be dropped
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
# coding=utf8 | |
import PIL | |
from PIL import ImageFont | |
from PIL import Image | |
from PIL import ImageDraw | |
def text2png(text, fullpath, color = "#000", bgcolor = "#FFF", fontfullpath = None, fontsize = 13, leftpadding = 3, rightpadding = 3, width = 200): | |
REPLACEMENT_CHARACTER = u'\uFFFD' | |
NEWLINE_REPLACEMENT_STRING = ' ' + REPLACEMENT_CHARACTER + ' ' |
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
// Closure is necessary to get rid of 'strict mode' as `args.callee.caller` cannot be used in 'strict mode' | |
(function (scope) { | |
// LeClass declaration | |
// =================== | |
scope.LeClass = function () { | |
// Private members declared in private namespace `prv` | |
var prv = { | |
trala: 'you touch my tralala...', |
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
/** | |
* Metni url'de kullanılabilir hale çevirir. Boşluklar tireye çevrilir, | |
* alfanumerik olmayan katakterler silinir. | |
* | |
* Transform text into a URL path slug(with Turkish support). | |
* Spaces turned into dashes, remove non alnum | |
* | |
* @param string text | |
*/ | |
slugify = function(text) { |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/> | |
<script src="http://cmx.io/v/0.1/cmx.js"></script> | |
<body> | |
<scene id="scene1"> | |
<label t="translate(0,346)"> | |
<tspan x="0" y="0em">In Java world</tspan> | |
</label> | |
<actor t="translate(131,49)" pose="-11,9|-5,117|-11,99|-11,89|-11,79|-11,59|-16,34|-21,9|-6,34|-1,9|-18,79|-40,79|-6,79|-1,59"> |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/> | |
<script src="http://cmx.io/v/0.1/cmx.js"></script> | |
<body> | |
<scene id="scene1"> | |
<label t="translate(0,346)"> | |
<tspan x="0" y="0em">Kod Gemisi stajindan önce</tspan> | |
</label> | |
<actor t="translate(131,49)" pose="-11,9|-17,121|-11,99|-11,89|-11,79|-11,59|-16,34|-21,9|-6,34|-1,9|-30,82|-30,62|10,86|15,66"> |
Aşağıdaki kodu inceleyiniz:
public abstract class Animal {...}
public class Human extends Animal implements Omnivore {...}
public class Deer extends Animal implements Herbivore {...}
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
function preload(imageArray, imageCache, index) { | |
Array.isArray = typeof Array.isArray == 'function' ? Array.isArray : function(a){return typeof a != 'undefined' && a.constructor == Array} | |
index = index || 0; | |
if (imageArray && imageArray.length > index) { | |
var img = new Image (); | |
var preloadFn = preload.bind(this, imageArray, imageCache, index + 1); | |
img.onload = preloadFn; | |
img.onerror = preloadFn; | |
img.src = imageArray[index]; | |
if(Array.isArray(imageCache)) { |
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.io.IOException; | |
import java.net.URISyntaxException; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.security.KeyFactory; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.PrivateKey; | |
import java.security.interfaces.RSAPublicKey; | |
import java.security.spec.InvalidKeySpecException; | |
import java.security.spec.PKCS8EncodedKeySpec; |
OlderNewer