Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ilshad on github.
  • I am ilshad (https://keybase.io/ilshad) on keybase.
  • I have a public key ASCVSPF6JlADf97u730Qq_Lumv9T1_m_3iw3cziso-ju4Ao

To claim this, I am signing this object:

@ilshad
ilshad / deps.edn
Last active November 15, 2018 06:14
Quickstart with Clojure CLI + Cider + Figwheel + Pedestal
{:deps {org.clojure/clojure {:mvn/version "1.9.0"}
org.clojure/clojurescript {:mvn/version "1.10.339"}
io.pedestal/pedestal.service {:mvn/version "0.5.4"}
io.pedestal/pedestal.jetty {:mvn/version "0.5.4"}
io.pedestal/pedestal.service-tools {:mvn/version "0.5.4"}
com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}
com.bhauman/figwheel-main {:mvn/version "0.1.9"}
hiccup {:mvn/version "1.0.5"}}
:paths ["src" "target" "resources"]
@ilshad
ilshad / D2SDataProtection.java
Last active May 17, 2018 19:46
Encrypt / decrypt URL with Blowfish + Base64
package com.company;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import java.security.GeneralSecurityException;
import org.apache.commons.codec.binary.Base64;
/**
*
* D2SDataProtection.encrypt("http://example.com/image.png", "SD88-4Si-oVJ") =>
#!/bin/sh
#
# JBoss standalone control script
#
# Provided in JBoss AS 7.1.1
# Modified for Ubuntu Server 10.04 by koma
#
# chkconfig: - 80 20
# description: JBoss AS Standalone
# processname: standalone
@ilshad
ilshad / gist:2644595
Created May 9, 2012 13:45
HTML5 dashed line implementation
var CP = window.CanvasRenderingContext2D && CanvasRenderingContext2D.prototype;
if (CP && CP.lineTo) {
CP.dashedLine = function (x, y, x2, y2, dashArray) {
this.moveTo(x, y);
if (!dashArray)
dashArray = [10,5];
var dashCount = dashArray.length,
dx = (x2-x),
dy = (y2-y),
# Create ZEO server:
# $ mkdir MyZEOServer
# $ cd MyZEOServer
# $ wget http://python-distribute.org/bootstrap.py
# Add this file as buildout.cfg and edit it. Note values in [server] section,
# zeo.conf template: address for ZEO-server, address for monitor
# (or comment it to disable). Edit filstorage name, path, log, path.
# Create these paths. Build: