Skip to content

Instantly share code, notes, and snippets.

View hendrikswan's full-sized avatar

hendrik swanepoel hendrikswan

View GitHub Profile
@err0r500
err0r500 / main.go
Last active July 15, 2023 15:27
gin gonic with jwt from auth0 (and CORS enabled)
package main
import (
"github.com/auth0/go-jwt-middleware"
"github.com/dgrijalva/jwt-go"
"gopkg.in/gin-gonic/gin.v1"
)
func main() {
startServer()
@ericjang
ericjang / TensorFlow_Windows.md
Last active March 27, 2021 22:19
Setting up TensorFlow on Windows using Docker.

TensorFlow development environment on Windows using Docker

Here are instructions to set up TensorFlow dev environment on Docker if you are running Windows, and configure it so that you can access Jupyter Notebook from within the VM + edit files in your text editor of choice on your Windows machine.

Installation

First, install https://www.docker.com/docker-toolbox

Since this is Windows, creating the Docker group "docker" is not necessary.

@marty-wang
marty-wang / gist:5a71e9d0a6a2c6d6263c
Last active February 13, 2024 07:34
Compile and deploy React Native Android app of Release version to device.
Disclaimer: The instructions are the collective efforts from a few places online.
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did.
First off, bundle.
==================
1. cd to the project directory
2. Start the react-native packager if not started
3. Download the bundle to the asset folder:
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
@gaearon
gaearon / combining.js
Created June 3, 2015 18:03
Combining Stateless Stores
// ------------
// counterStore.js
// ------------
import {
INCREMENT_COUNTER,
DECREMENT_COUNTER
} from '../constants/ActionTypes';
const initialState = { counter: 0 };
@mesonoxian
mesonoxian / zookeeper-kafka
Created May 27, 2015 07:01
Simple Zookeeper and Kafka init.d Startup Script
#! /bin/bash
### BEGIN INIT INFO
# Provides: kafka
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: kafka service
### END INIT INFO
@pH200
pH200 / cycle.js
Last active July 6, 2017 05:30
Small Todo by using Cycle.js
import Cycle, {Rx, h} from 'cyclejs';
Cycle.registerCustomElement('TodoList', (rootElem$, props) => {
let vtree$ = props.get('items$').map(items =>
h('div', h('ul', items.map((itemText, index) =>
h('li', { key: index + itemText }, itemText)))));
rootElem$.inject(vtree$);
});
let vtree$ = Cycle.createStream(function (interaction$) {
@rosstimson
rosstimson / java.env
Created July 3, 2014 10:04
Init Script (RHEL, CentOS) for ZooKeeper + optional configs (assumes zookeeper tarball extracted to /opt/zookeeper)
# /opt/zookeeper/conf/java.env
ZOO_LOG4J_PROP="INFO,ROLLINGFILE"
ZOO_LOG_DIR="/var/log/zookeeper/"
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@border
border / mgoExample.go
Created August 27, 2012 15:33
mgo example
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {
@johnathan-sewell
johnathan-sewell / Program.cs
Created February 15, 2012 13:26
Log4Net basic console example
using System;
using System.Reflection;
using log4net;
using log4net.Config;
//see http://logging.apache.org/log4net/release/manual/configuration.html#attributes
[assembly: XmlConfigurator(Watch = true)]
namespace Log4NetExamples.ConsoleApplication1
{
internal class Program