Skip to content

Instantly share code, notes, and snippets.

View arjamizo's full-sized avatar

Artur Zochniak arjamizo

  • Poland
View GitHub Profile
@arjamizo
arjamizo / proxy_views.py
Created October 20, 2019 12:44 — forked from joeshaw/proxy_views.py
super-hacky flask proxy
# coding:utf-8
# Copyright 2011 litl, LLC. All Rights Reserved.
import httplib
import re
import urllib
import urlparse
from flask import Blueprint, request, Response, url_for
from werkzeug.datastructures import Headers
@arjamizo
arjamizo / proxy_views.py
Created October 20, 2019 12:44 — forked from joeshaw/proxy_views.py
super-hacky flask proxy
# coding:utf-8
# Copyright 2011 litl, LLC. All Rights Reserved.
import httplib
import re
import urllib
import urlparse
from flask import Blueprint, request, Response, url_for
from werkzeug.datastructures import Headers

Install Signal Desktop as a standalone app, without Chrome dependency *

There is now an easier way with automatic Signal Desktop installer, which also keeps Signal auto updated.

This guide is for Linux systems, but as Node.js and NW.js are cross-platform, it is more or less the same for macOS and Windows. I will provide CLI commands, as they are universal for different Linux distros, but most of the steps could be as easily done with your GUI apps of choice.

  1. Install Node.js

  2. Install NW.js:

@arjamizo
arjamizo / web-servers.md
Created July 19, 2016 17:48 — forked from willurd/web-servers.md
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
@arjamizo
arjamizo / on_stateful_code.txt
Created March 9, 2016 07:00 — forked from josteink/on_stateful_code.txt
On why stateful code is bad
On why stateful code is bad
===========================
STUDENT: Sir, can I ask a question?
TEACHER: Yes!
STUDENT: How do you put an elephant inside a fridge?
TEACHER: I don't know.
STUDENT: It's easy, you just open the fridge and put it in. I have another question!
TEACHER: Ok, ask.
STUDENT: How to put a donkey inside the fridge?
{
"windows": {
"cmd": ["cmd", "/c", "mkdir bin 2> nul & echo CD %cd% & echo Path %path% & echo Note that this script works only for default package & javac -d bin $file && echo Build successful. && java -cp bin ${file_name/\\.java//}"]
},
"linux": {
"cmd": ["sh", "-c", "javac $file_base_name.java && java $file_base_name"]
},
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java"
}
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../yt-video/yt-search-video.html">
<polymer-element name="my-element">
<template>
<style>