Skip to content

Instantly share code, notes, and snippets.

View eddieespinal's full-sized avatar

Eddie Espinal eddieespinal

View GitHub Profile
@amstanley
amstanley / gist:9da7febc9a3e3c2228ee
Last active May 4, 2023 11:34
How to install openALPR on a Raspberry Pi a/o 20160214
#!/bin/bash
# STATUS A/O 2016 02 14: tested, works
# based on https://barclaysapps.wordpress.com/2014/07/06/openalpr-install-for-rpi-and-udoo-and-tre-and-yun/ ,
# http://lukagabric.com/raspberry-pi-license-plate-recognition/, and updated for new packages.
# there are other random notes and googled pages that also informed this tutorial whihc may not be specifically referenced.
#This is not optimized for space or whatever, but does work. well, not as of 2016 01 03 but working to fix that)
# discussion is at https://groups.google.com/forum/#!topic/openalpr/-vckIsPe618: please contribute if you can, and ask questions if you # # have them
# thanks to Timis for tips and hints...
wifi.setmode(wifi.STATION)
wifi.sta.config("SSID","password")
-- Send POST when buttons A or B pressed
PIN_BUTTON_A = 3 -- GPIO0
PIN_BUTTON_B = 4 -- GPIO1
TIME_ALARM = 25 -- 0.025 second, 40 Hz
gpio.mode(PIN_BUTTON_A, gpio.INPUT, gpio.PULLUP)
@adriengibrat
adriengibrat / bower.json
Last active March 13, 2022 00:39
Parse ISO 8601 duration as function that sums duration to a given date
{
"name": "parseDuration",
"version": "0.0.1",
"main": "./parseDuration.es5.js"
}
@bavensky
bavensky / ESP8266 with 20x4 i2c LCD.ino
Last active February 13, 2024 13:01
ESP8266 with 20x4 i2c LCD [Arduino IDE]
// ESP8266 with 20x4 i2c LCD
// Compatible with the Arduino IDE 1.6.4
// Library https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library
// Bavensky :3
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x20,20,4);
@dogrocker
dogrocker / ESP8266 Web Server to storing ap config to EEPROM.md
Last active October 12, 2022 12:02
ESP8266 Web Server to storing ap config to EEPROM

ESP8266 Web Server to storing ap config to EEPROM.

Original by chriscook8 from esp8266.com I just modified to use ESP8266WebServer library for easy to handle the http request.

This is sample code not yet complete.

Todo

  • when Wifi connected need to close the softAP.
@stevebowman
stevebowman / AWSLambdaSimpleSMS.js
Last active April 17, 2025 16:26
AWS Lambda Function to send an SMS message via the Twilio API
console.log('Loading event');
// Twilio Credentials
var accountSid = '';
var authToken = '';
var fromNumber = '';
var https = require('https');
var queryString = require('querystring');

Build a scalable Twitter clone with Django and GetStream.io

In this tutorial we are going to build a Twitter clone using Django and GetStream.io, a hosted API for newsfeed development.

We will show you how easy is to power your newsfeeds with GetStream.io. For brevity we leave out some basic Django-specific code and recommend you refer you to the Github project for the complete runnable source code. At the end of this tutorial we will have a Django app with a profile feed, a timeline feed, support for following users, hashtags and mentions.

I assume that you are familiar with Django. If you're new to Django the [official tutorial] (https://docs.djangoproject.com/en/2.0/intro/) explains it very well.

@royashbrook
royashbrook / genDimDate.cs
Created June 30, 2014 20:07
Generate Dimension Table in C#
//uses LINQPad
void Main()
{
List<dimDate> dimDates = genDimDate(
DateTime.Parse("1/1/2012")
, DateTime.Parse("12/31/2017")
);
dimDates.Dump();
}
@smittytone
smittytone / nokia_lcd.device.nut
Last active August 29, 2015 14:00
Electric Imp example code to drive a Nokia 3310/5110 84 x 48 mono LCD
// Nokia 5110 control code for the imp
// Adapted by Tony Smith from a variety of sources:
// http://playground.arduino.cc/Code/PCD8544
// http://www.microsyl.com/index.php/2010/03/24/nokia-lcd-library/
// Assign the control pins to global variables
PIN_RST <- hardware.pin9;
PIN_CE <- hardware.pin8;
PIN_DC <- hardware.pin7;
@ynechaev
ynechaev / gist:8123997
Last active June 9, 2017 23:18
UITableViewCell popular animation (flipping around Y axis, depending on scroll direction)
@interface YourViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
UIImageOrientation scrollOrientation;
CGPoint lastPos;
}
- (void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
if (tableView.isDragging) {
UIView *myView = cell.contentView;
CALayer *layer = myView.layer;
CATransform3D rotationAndPerspectiveTransform = CATransform3DIdentity;