Skip to content

Instantly share code, notes, and snippets.

{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "dev-todo-app-flask-mongo-gogs",
"annotations": {
"openshift.io/display-name": "Flask + MongoDB (Ephemeral)",
"description": "An example Flask application with a MongoDB database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.2/README.md.\n\nWARNING: MongoDB instance is ephemeral so any data will be lost on pod destruction.",
"tags": "quickstart,python,flask,database,mongodb,gogs",
"iconClass": "icon-python,icon-mongodb",
@jci
jci / gist:197411532336780ab2a4b2e48b8daba4
Created July 27, 2018 03:02
Reencode from RTSP from DVR, serve the video via OGG that can be opened using a browser.
cvlc "rtsp://IPADDR/user=username&password=password&channel=CHANNEL&stream=STREAMQLTY.sdp" --sout="#transcode{vcodec=theo,vb=1024}:http{dst=:8080/webcam.ogg}"
This will stream only video, not audio.
Be aware, your mileage may vary.
Change the fps by adding fps=FPS after the vcodec section. Be warned that the stream may take some time to catch up.
Feel free to adjust vb= for video bitrate.
@jci
jci / alarmclock.ino
Created March 18, 2018 03:29
Guess what this does
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <Servo.h>
const int ledPin = 13; //pin 13 built-in led
const int soundPin = A0; //sound sensor attach to A0
int temporal = 0;
const int sweetspotdown = 150; // change this to the sweetspot value
int value = 0;
const int silenceup = 350;
#include <inttypes.h>
#include <Arduino.h>
#include <Wire.h>
uint8_t lcd_addr = 0x24;
void setup() {
Wire.begin();
// put your setup code here, to run once:
/*************************************************************************
*
* Driver for the Nokia 3310 LCD - single file, shake and bake!
*
**************************************************************************/
/*
for the arduino initiated, you got this module, and don't know how to connect it, here's the how:

Keybase proof

I hereby claim:

  • I am jci on github.
  • I am jci (https://keybase.io/jci) on keybase.
  • I have a public key whose fingerprint is 58CD 7D1A A819 3974 CD5F 0FCD B7EE 1F2F 4BFA 2FF1

To claim this, I am signing this object: