Skip to content

Instantly share code, notes, and snippets.

View NicoJuicy's full-sized avatar

Nico Sap NicoJuicy

View GitHub Profile
@captn3m0
captn3m0 / 01-Introduction.mkd
Last active October 6, 2015 00:58
Quick Primer to Software Development

This document is guided at SDSLabs members, but should be equally valid to anyone working in technology.

I've tried to keep all advice language agnostic and independent from any technology. This is like a series of short blog posts I've condensed to a single gist. Feel free to fork and give some more of such advice.

@yefim
yefim / app.coffee
Last active October 4, 2016 07:19
A simple opt in group messaging solution with Twilio, Redis, and Expressjs
NUMBERS_SET = 'numbers'
TWILIO_NUMBER = '+12345678900'
TWILIO_SID = 'account_sid'
TWILIO_TOKEN = 'auth_token'
express = require('express')
http = require('http')
path = require('path')
redis = require('redis')
app = express()
@zQueal
zQueal / BTSync.md
Last active November 9, 2016 05:58
Debian and Ubuntu Server Packages for BitTorrent Sync client. Credit goes to Tuxpoldo (https://github.com/Tuxpoldo). Original Thread: http://forum.bittorrent.com/topic/18974-debian-and-ubuntu-server-packages-for-bittorrent-sync/

Since I was one of the alfa-testers, I was able to develop a deployment concept for linux servers which permits to deploy BitTorrent Sync as single or multiple daemons with specific configurations. There are now ready-to-use deb packages available both for Ubuntu or Debian with full debconf-support for automated creation of an optional default configuration. If you are searching for a version more suitable for personal desktop use, please look here. Update: User @tuxpoldo has opened a repository, and keeps it current. Follow those instructions instead!

#INSTALLATION IN UBUNTU

Currently there are packages available for Ubuntu precise, quantal, raring and saucy supporting both i386 and amd64. The packages can be easily installed by adding the PPA and then installing as usual:

sudo add-apt-repository ppa:tuxpoldo/btsync
sudo apt-get update
sudo apt-get instal
class MyFeature : FeatureSchemaBase
{
class MyFunc : Function
{
public MyFunc(string schema) : base(new DbObjectName(schema, "hello"))
{
}
public override void Write(DdlRules rules, StringWriter writer)
{
namespace Epi.Libraries.Commerce.Predictions
{
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Web;
using EPiServer.Commerce.Catalog.ContentTypes;
using EPiServer.Commerce.Catalog.Linking;
@stonehippo
stonehippo / RPi-Dashing-howto.md
Last active October 6, 2021 13:52
Setting up a Raspberry Pi as a dashboard server with Dashing

Setting up a Raspberry Pi as a dashboard server with Dashing

Why the heck did I do this?

I wanted to set up one of my Raspberry Pi's as a data dashboard, pushing sensor data to a web interface that's easy to digest. I decided to use Shopify's Dashing framework. Dashing is based on Sinatra, and is pretty lightweight.

Dashing does require Ruby 1.9.3 to run. In addition, it makes use of the execjs gem, which needs to have a working Javascript interpreter available. Originally, I tried to get therubyracer working, but decided to switch over to Node.js when I ran into roadblocks compiling V8.

One warning: The RPi is a very slow system compared with modern multi-core x86-style systems. It's pretty robust, but compiling all this complex software taxes the system quite a bit. Expect that it's going to take at least half a day to get everything going.

@emptyother
emptyother / MyExtensions.linq
Last active November 10, 2021 16:18
Linqpad extensions
<Query Kind="Program">
<NuGetReference>Newtonsoft.Json</NuGetReference>
<Namespace>Newtonsoft.Json</Namespace>
<Namespace>System.Globalization</Namespace>
</Query>
void Main()
{
// Write code to test your extensions here. Press F5 to compile and run.
}
@Xiaoy312
Xiaoy312 / app manager.linq
Created April 8, 2019 18:20
Linqpad script to manage apps on android devices
<Query Kind="Program">
<Namespace>LINQPad.Controls</Namespace>
<Namespace>System.Threading.Tasks</Namespace>
</Query>
#define YOLO_NO_CONFIRM
void Main()
{
Util.AutoScrollResults = false;
@pedroreys
pedroreys / Message.cs
Created April 12, 2013 20:18
Defining a custom JsonConverter and using it with the built-in JsonConverterAttribute
public class Message
{
[JsonConverter(typeof(SHA256StringJsonConverter))]
public string Password { get; set; }
}
@anshajk
anshajk / windowed_dataset.py
Created June 20, 2020 11:25
A small function for creating a windowed dataset for sequential networks using tensorflow 2.x
def windowed_dataset(series, window_size, batch_size, shuffle_buffer):
"""Function for creating a windowed dataset for sequence training"""
dataset = tf.data.Dataset.from_tensor_slices(series)
dataset = dataset.window(window_size + 1, shift=1, drop_remainder=True)
dataset = dataset.flat_map(lambda window: window.batch(window_size + 1))
dataset = dataset.shuffle(shuffle_buffer).map(lambda window: (window[:-1], window[-1]))
dataset = dataset.batch(batch_size).prefetch(1)
return dataset