Skip to content

Instantly share code, notes, and snippets.

View Mazyod's full-sized avatar
🔬
R&D

Maz Mazyod

🔬
R&D
View GitHub Profile
@Mazyod
Mazyod / Dockerfile
Last active January 5, 2016 19:40
Poco C++ Backend Starter Dockerfile
FROM ubuntu
MAINTAINER Maz Jaleel <mazjaleel@gmail.com>
# Install necessary tools to build Poco
RUN apt-get update && apt-get install -yq \
unzip wget build-essential cmake \
openssl libssl-dev \
unixODBC unixODBC-dev odbc-postgresql
@radex
radex / hard-reproductions.md
Last active January 30, 2016 11:57
Trouble reproducing a bug? Run this checklist.

Trouble reproducing a bug? Run this checklist to make sure you're reproducing user's environment as closely as possible:

Device

  • iOS version?
  • iPad/iPhone?
  • CPU architecture?
  • Screen size? Orientation? Slide-over/Split View?

iOS settings

config :my_app, :twitter_api,
client: Twitter.SandboxClient
@tevino
tevino / fix_virtualenv
Last active March 24, 2024 09:41
Fix python virtualenv after python update
#!/usr/bin/env bash
ENV_PATH="$(dirname "$(dirname "$(which pip)")")"
SYSTEM_VIRTUALENV="$(which -a virtualenv|tail -1)"
BAD_ENV_PATHS="/usr/local"
echo "Ensure the root of the broken virtualenv:"
echo " $ENV_PATH"
@tresni
tresni / gist:83b9181588c7393f6853
Last active February 19, 2024 08:00
Authy to 1Password

Moving Authy to 1Password

1Password 5.3 for OSX, 5.2 for iOS, and 4.1.0.538 for Windows support OTP. I've been using Authy for a while now, but the fact is, I haven't really been using 2FA for some time. As mentioned by 1Password in a recent blog post, having the OTP generator and password on the same device is very much not 2FA. It's just an expiring OTP, which can help, but let's not kid ourselves too much.

With that out of the way. One of the things that was interesting to me was moving my OTP out of Authy and into 1Password. I like the control I get with 1Password, but I didn't want to have to reset all my OTP right away, that would suck. So, I got to dissecting the Authy Chrome App to see what I could do.

Run the Authy Chrome app and make sure it's unlocked.

Now, enable Developer mode in Chrome. We'll need this to inspect the background application that stores al

#include <Poco/Net/HTTPRequest.h>
#include <Poco/Net/HTTPResponse.h>
#include <Poco/Net/HTTPClientSession.h>
#include <Poco/StreamCopier.h>
#include <Poco/Net/HTTPCredentials.h>
#include <sstream>
#include <iostream>
using namespace Poco::Net;
@radex
radex / lexer.swift
Last active February 15, 2017 13:08
Wrote a little lexer/tokenizer for fun. (Warning: I have no idea what I'm doing)
import Foundation
struct Stream {
let string: NSString
var position: Int
var matchingRange: NSRange {
return NSRange(location: position, length: string.length - position)
}
}
@mikaxyz
mikaxyz / AppDelegate.swift
Last active December 30, 2015 11:34
Namespaced classes in swift
//
// AppDelegate.swift
// Namespaced
//
// Created by Mika Jauhonen on 2014-09-18.
// Copyright (c) 2014 Mika Jauhonen. All rights reserved.
//
import UIKit
@duemunk
duemunk / Guilty
Last active June 23, 2016 12:11
Operator overload badge
<img src="http://img.shields.io/badge/Operator_overload-guilty-red.svg" height="20" alt="Uses operator overloads"/>
@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing