Skip to content

Instantly share code, notes, and snippets.

@kevinmeredith
kevinmeredith / gist:1e899f38717be37c321e
Last active August 29, 2015 14:21
Implementation of a Simple State Machine in Scala/Akka

Implementing a Simple State Machine with Akka

Problem

Prof. Charles Pinter's A Book of Abstract Algebra presents the following exercise:

Ch 6 (Functions) part H, problem 4
Given a stream of 1's and 0's, draw the state machine diagram if the stream ends with 111

I came up with the following diagram:

@non
non / answer.md
Last active January 9, 2024 22:06
answer @nuttycom

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.

@staltz
staltz / introrx.md
Last active April 29, 2024 09:25
The introduction to Reactive Programming you've been missing
@pbssubhash
pbssubhash / Google XSS challenge solutions..
Last active August 2, 2023 03:38
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>
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@willurd
willurd / web-servers.md
Last active April 28, 2024 21:38
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@jdennes
jdennes / CreateSendOAuthTest.java
Last active December 14, 2015 00:09
A Java application to demonstrate authenticating with the Campaign Monitor API using OAuth. Uses the createsend-java library as well as the Spark micro web framework (but could easily be adapted for use with any Java web application framework).
// Ensure you set the CREATESEND_CLIENT_ID, CREATESEND_CLIENT_SECRET,
// and CREATESEND_REDIRECT_URI environment variables for your registered
// OAuth application.
import static spark.Spark.*;
import spark.*;
import com.createsend.General;
import com.createsend.models.clients.ClientBasics;
import com.createsend.models.OAuthTokenDetails;
import com.createsend.util.AuthenticationDetails;
namespace Sagas
{
using System;
using System.Collections.Generic;
class Program
{
static ActivityHost[] processes;