Skip to content

Instantly share code, notes, and snippets.

@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 19, 2024 17:40
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!






\

@gabonator
gabonator / camera.md
Created June 4, 2016 13:48
Cheap chinese IP camera with H264 encoding based on Hisilicon 8M (Hi3518E) chip

Cheap chinese IP camera with H264 encoding based on Hisilicon 8M (Hi3518E) chip

Video stream url for VLC/DVR:

  • rtsp://192.168.1.93:554/user=admin&password=&channel=&stream=.sdp?real_stream--rtp-caching=100

Telnet access

  • telnet 192.168.1.10 23
  • Localhost login: root
  • Password: xmhdipc
@mbinna
mbinna / hack.sh
Created April 11, 2012 05:57 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2357277/hack.sh | sh
#
@johnwargo
johnwargo / relay-test.py
Last active January 15, 2024 22:00
Simple Python app for controlling a relay through an GPIO Zero Output device
#!/usr/bin/python
# A simple Python application for controlling a relay board from a Raspberry Pi
# The application uses the GPIO Zero library (https://gpiozero.readthedocs.io/en/stable/)
# The relay is connected to one of the Pi's GPIO ports, then is defined as an Output device
# in GPIO Zero: https://gpiozero.readthedocs.io/en/stable/api_output.html#outputdevice
import sys
import time
@thoas
thoas / puller.py
Created January 10, 2012 15:04
Migration script from MySQL to PostgreSQL via SQLAlchemy
#!/usr/bin/env python
import getopt
import sys
from sqlalchemy import create_engine, MetaData, Table
from sqlalchemy.dialects.mysql.base import TINYINT
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.exc import ProgrammingError
@geoffalday
geoffalday / secretkey.py
Created March 12, 2012 12:28
How to generate a secret key with Python
# How to generate a secret key with Python
# via http://flask.pocoo.org/docs/quickstart/
import os
os.urandom(24)
@mrjoes
mrjoes / base.py
Created March 27, 2015 00:05
CSV export for Flask-Admin
class BaseModelView(ModelView):
list_template = 'admin/model_list.html'
export_columns = None
# Exporting
def _get_data_for_export(self):
view_args = self._get_list_extra_args()
# Map column index to column name
@soemarko
soemarko / RoastLoggerMax6675-Behmor.ino
Last active December 9, 2021 18:08
RoastLogger + MAX6675 + Behmor 1600
/****************************************************************************
RoastLoggerMax6675.ino
This sketch is for use with MAX 6675 thermocouple interface chips. A separate sketch
is available for MAX 31855 chips.
See the "Contributed Libraries" section of http://www.arduino.cc/en/Reference/Libraries
for details of how to install it.
@russss
russss / paypal2ofx.py
Created August 7, 2011 22:15
Convert a paypal CSV export to an OFX file
import csv
import sys
from collections import namedtuple
rows = csv.reader(sys.stdin)
fields = [field.strip().lower().replace(' ', '_').replace('/', '_')
for field in rows.next() if field.strip() != '']
PaypalRecord = namedtuple('PaypalRecord', fields)
@mdellavo
mdellavo / sqlalchemy-typed-eav.py
Created March 23, 2011 21:45
A Typed Entity-Attribute-Value Pattern for SQLAlchemy
# CREATE TABLE foos (
# id INTEGER IDENTITY(1,1) NOT NULL PRIMARY KEY,
# );
# CREATE TABLE foo_data (
# foo_id INTEGER NOT NULL REFERENCES proposals(id),
# [key] VARCHAR(50) NOT NULL,
# [type] CHAR(1) NOT NULL DEFAULT 's' CHECK(type IN ('s', 'b', 'i', 'f'))