Skip to content

Instantly share code, notes, and snippets.

View devcli.sh
#!/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 {
View git_pull.sh
#!/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 Dec 17, 2017 — forked from tazjin/Main.java
Playing with Prometheus Java client
View Main.java
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;
View Google XSS challenge solutions..
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 Feb 4, 2016 — 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.
View himawari.ps1
#
# 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
#
View 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 Aug 29, 2015
A tweetable turing machine
View turing-tweet.js
/**
* 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 Jun 17, 2015
BartoszMilewski - Composition is the Essence of Programming - Challenges
View gist:f3af3da6eb0c8d3673d6
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.
View gist:caab9e1197344835a7cd
namespace Sagas
{
using System;
using System.Collections.Generic;
class Program
{
static ActivityHost[] processes;
@iszlai
iszlai / gist:52da08584a6977a639be
Created Dec 30, 2014
Scala functional vs imperative
View gist:52da08584a6977a639be
object Dot {
def main(args: Array[String]) {
println("Imperative")
val startTime = System.nanoTime()
testImperative()
val endTime = System.nanoTime()
println((endTime - startTime) / 1000000 + "\n")