Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#For the details see the article: https://iszlai.github.io/post/the_dev_cli/
#Set up a few working folders
LOGDIR="/var/tmp/dev-logs/"
REPOS="/Users/someUser/work/repos/"
#Always check pre-reqs
function check_repo {
#!/bin/bash
#Define the color yellow for later use
YELLOW='\033[0;33m'
#Define text reset
NC='\033[0m'
pathToRepos=~/work/repos
@iszlai
iszlai / Main.java
Created December 17, 2017 17:39 — forked from tazjin/Main.java
Playing with Prometheus Java client
import io.prometheus.client.*;
import io.prometheus.client.exporter.common.TextFormat;
import io.prometheus.client.hotspot.DefaultExports;
import spark.Request;
import spark.Response;
import java.io.IOException;
import java.io.StringWriter;
import java.util.Random;
@iszlai
iszlai / Google XSS challenge solutions..
Created November 25, 2016 09:31 — forked from pbssubhash/Google XSS challenge solutions..
Solutions of the Google XSS Challenge..
Hey All,
I am P.B.Surya.Subhash, a 17 Year coder,hacker and a student.
Recently I happen to see so many posts regarding this " Google XSS Challenge " and i was fortunate enough to complete them..
These are the solutions for the challenges ;)
##############################################################################
Level 1: Hello, world of XSS
https://xss-game.appspot.com/level1/frame
query=<script>alert('xss')</script>
@iszlai
iszlai / himawari.ps1
Created February 4, 2016 11:24 — forked from MichaelPote/himawari.ps1
Windows Powershell Script to download the latest image from the Himawari-8 satelite, combine the tiles into a single image, convert to jpg and then set as the desktop background.
#
# Himawari-8 Downloader
#
#
#
# This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image,
# converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background.
#
# http://himawari8.nict.go.jp/himawari8-image.htm
#
@iszlai
iszlai / day6.ex
Created December 28, 2015 15:48 — forked from petrikero/day6.ex
defmodule Benchmark do
def measure(function) do
elapsed = function
|> :timer.tc
|> elem(0)
|> Kernel./(1_000_000)
IO.puts "Elapsed = #{elapsed}s"
end
end
@iszlai
iszlai / turing-tweet.js
Last active August 29, 2015 14:27
A tweetable turing machine
/**
* Here's a turing machine that fits into a tweet with an example program.
* Original tweet: https://twitter.com/mrrrgn/status/630419814666780673
* Gif: http://i.imgur.com/4t31zA2.gif
* Turing machines: https://www.youtube.com/watch?v=dNRDvLACg5Q
*
* Think this is neat? Consider following me for more computer silliness:
* twitter.com/mrrrgn or rss my blog linuxpoetry.com
**/
@iszlai
iszlai / gist:f3af3da6eb0c8d3673d6
Created June 17, 2015 13:29
BartoszMilewski - Composition is the Essence of Programming - Challenges
object Category {
//Implement, as best as you can, the identity function in your favorite language
// (or the second favorite, if your favorite language happens to be Haskell).
def id[A]( a:A ):A=a; //> id: [A](a: A)A
//Implement the composition function in your favorite language.
namespace Sagas
{
using System;
using System.Collections.Generic;
class Program
{
static ActivityHost[] processes;
@iszlai
iszlai / gist:52da08584a6977a639be
Created December 30, 2014 12:08
Scala functional vs imperative
object Dot {
def main(args: Array[String]) {
println("Imperative")
val startTime = System.nanoTime()
testImperative()
val endTime = System.nanoTime()
println((endTime - startTime) / 1000000 + "\n")