Skip to content

Instantly share code, notes, and snippets.

View kenju254's full-sized avatar

Kenneth Kinyanjui kenju254

View GitHub Profile
@profnandaa
profnandaa / 0-Messenger-Bot.md
Last active April 19, 2018 20:51
Introduction to Facebook Messenger Bots - @DevC-Nairobi

Building a Basic Messenger Bot with Node.js

For this tutorial, you need just basic understanding of JavaScript. The aim of this tutorial is to show you how easy it is to build messenger bots. When you scroll down this page, you will find out the actual lines of code that we will write are just about 19 LOC.

Prerequisites

@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@Brainiarc7
Brainiarc7 / ffmpeg-desktop-livestreaming-nvenc-and netcat.md
Last active December 13, 2023 03:27
This gist will show you how to livestream your Linux desktop to a client via FFMpeg using a GPU-accelerated video encoder (NVENC and VAAPI-based)

Low-Latency Live Streaming for your Desktop using ffmpeg and netcat:

Preamble:

In this post I will explore how to stream a video and audio capture from one computer to another using ffmpeg and netcat, with a latency below 100ms, which is good enough for presentations and general purpose remote display tasks on a local network.

The problem:

Streaming low-latency live content is quite hard, because most software-based video codecs are designed to achieve the best compression and not best latency. This makes sense, because most movies are encoded once and decoded often, so it is a good trade-off to use more time for the encoding than the decoding.

@darcyliu
darcyliu / install_spark_centos7.sh
Created April 1, 2016 09:40
Install Spark on CentOS 7
#!/bin/bash
# Install Spark on CentOS 7
yum install java -y
java -version
yum install wget -y
wget http://downloads.typesafe.com/scala/2.11.7/scala-2.11.7.tgz
tar xvf scala-2.11.7.tgz
sudo mv scala-2.11.7 /usr/lib
sudo ln -s /usr/lib/scala-2.11.7 /usr/lib/scala
@waleoyediran
waleoyediran / jinja2backend.py
Last active July 20, 2016 11:58 — forked from carljm/jinja2backend.py
Adding support for context processors for Jinja2 templates in Django
import sys
import six
from django.template.backends.jinja2 import Jinja2, Template
from django.template.backends.utils import csrf_token_lazy, csrf_input_lazy
from django.template.exceptions import TemplateDoesNotExist
from jinja2.exceptions import TemplateSyntaxError
from jinja2.utils import import_string
import jinja2
@martincr
martincr / Python-3-Django-El-Capitan.md
Last active May 4, 2022 05:04
Install Python 3 and Django on Mac OS X El Capitan (10.11.2) - and use virtualenv and virtualenvwrapper

Preamble

Background Reading

@kn9ts
kn9ts / grammer.expression.py
Created December 6, 2015 07:24
An example of defining a programming language grammer
# Expanding Exp
# This is very, very difficult.
grammar = [
("exp", ["exp", "+", "exp"]),
("exp", ["exp", "-", "exp"]),
("exp", ["(", "exp", ")"]),
("exp", ["num"]),
]
@chenigodwin
chenigodwin / Automated traffic data collection Algorithm,Godwin Micheni 5th Year,Civil Engineering, DeKUT
Last active October 14, 2015 06:10
Dedan Kimathi University,5th year project.Automatic Traffic Data Collection and Analysis Using Optical Camera and Sensor Image Recognition
% PART A
%linking camera with rasperry pi
%creating a camera board object
clear rpi;
rpi= raspi();
cam = cameraboard(rpi,'Resolution','640x480');
%PART B
% code to start the camera and to capture image
Clear all
Close all
@kenju254
kenju254 / README.md
Created September 23, 2015 08:55 — forked from denji/README.md
Remove WebStorm; PhpStorm; PyCharm; RubyMine; AppCode; CLion, IntelliJ; 0xDBE10 settings and cli-links from Mac OSX

Quick uninstall JetBrains settings:

curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-uninstall.sh | bash -s
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /html/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /html/index.php [L]
</IfModule>