This is a very simple HTTP server for Unix, using fork(). It's very easy to use
- include header
httpd.h
- write your route method, handling requests.
- call
serve_forever("12913")
to start serving on port 12913
[ | |
{ | |
"state": "Adamawa", | |
"alias": "adamawa", | |
"lgas": [ | |
"Demsa", | |
"Fufure", | |
"Ganye", | |
"Gayuk", | |
"Gombi", |
// http://stackoverflow.com/a/16484266/754377 | |
function DataBind(element, data) { | |
this.data = data; | |
this.element = element; | |
element.value = data; | |
element.addEventListener("change", this, false); | |
} | |
DataBind.prototype.handleEvent = function(event) { |
# QEmu | |
brew install qemu | |
# Home for out tests | |
mkdir ~/arm-emu | |
cd ~/arm-emu | |
# Download initrd and kernel | |
wget http://ftp.de.debian.org/debian/dists/jessie/main/installer-armel/current/images/versatile/netboot/initrd.gz |
If you'd like to use a .jar file in your project, but it's not available in any Maven repository, | |
you can get around this by creating your own local repository. This is done as follows: | |
1 - To configure the local repository, add the following section to your pom.xml (inside the <project> tag): | |
<repositories> | |
<repository> | |
<id>in-project</id> | |
<name>In Project Repo</name> | |
<url>file://${project.basedir}/libs</url> |
import matplotlib | |
matplotlib.use('TkAgg') | |
from numpy import arange, sin, pi | |
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg | |
from matplotlib.figure import Figure | |
import tkinter as Tk | |
import tkinter.ttk as ttk | |
class Plot2D(Tk.Frame): | |
def __init__(self,parent,**kwargs): |
// Implementation in ES6 | |
function pagination(c, m) { | |
var current = c, | |
last = m, | |
delta = 2, | |
left = current - delta, | |
right = current + delta + 1, | |
range = [], | |
rangeWithDots = [], | |
l; |
/** | |
* This are a collection of examples for C 201. | |
* These combine concepts you may or may not be | |
* familiar with and are especially useful for | |
* students new to C. There is a lot of really | |
* cool stuff you can do in C without any cool | |
* languages. | |
* | |
* This is file in particular is an introduction | |
* to fun function usage in C. |
var ffmpeg = require('ffmpeg'); | |
try { | |
var process = new ffmpeg('example.mp4'); | |
process.then(function (video) { | |
console.log('The video is ready to be processed'); | |
var watermarkPath = 'watermark-suissa.png', | |
newFilepath = './video-com-watermark.mp4', | |
settings = { | |
position : "SE" // Position: NE NC NW SE SC SW C CE CW |
# | |
# Acts as a nginx HTTPS proxy server | |
# enabling CORS only to domains matched by regex | |
# /https?://.*\.mckinsey\.com(:[0-9]+)?)/ | |
# | |
# Based on: | |
# * http://blog.themillhousegroup.com/2013/05/nginx-as-cors-enabled-https-proxy.html | |
# * http://enable-cors.org/server_nginx.html | |
# | |
server { |