Skip to content

Instantly share code, notes, and snippets.

@zero-is-one
zero-is-one / git-deployment.md
Created October 20, 2018 15:57 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.

import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',

Is there any way to attach data to a nano transaction?

No, It is impossible to attach any info additional info to a transaction. It was a rejected feature. https://github.com/clemahieu/raiblocks/wiki/Rejected-features. A hacky way is to embed data into the transaction amount. https://jsfiddle.net/m618z2ze/6/

Is Nano anonymous? What anonomity features does nano have? Nano should be anonymous.

Nano is like other cryptocurrencies in that it is "Pseudo anonymous". Adding anonomity is a rejected feature https://github.com/clemahieu/raiblocks/wiki/Rejected-features. There are no plans to add this to Nano anytime in the near future, if ever.

Does Nano have smart contracts?

@zero-is-one
zero-is-one / ec2-rai-node.md
Created January 11, 2018 18:29 — forked from numtel/ec2-rai-node.md
Install rai_node on EC2 Ubuntu instance

Follow these instructions to start an EC2 instance running Ubuntu that will run rai_node on startup

  1. Select Ubuntu Server 16.04 LTS (HVM), SSD Volume Type. A t2.small or larger instance type is recommended.

  2. Configure the security group to match the screenshot.

  3. Download install_rai_node.sh below, update the URLs with their latest versions.

    Get latest rai_node archive URL from https://github.com/clemahieu/raiblocks/releases.

    Get latest gdrive-linux-x64 version URL from https://github.com/prasmussen/gdrive#downloads

@zero-is-one
zero-is-one / gist:3019a2e591917c3e7f3e
Created May 20, 2014 17:53
Emberfire Session Object
//help
// http://stackoverflow.com/questions/18209862/how-and-when-to-use-ember-application-register-and-inject-methods
// http://webcloud.github.io/blog/2014/04/07/emberjs-authentication-the-right-way-javascript-version/
// https://github.com/andrewreedy/ember-session
App.Session = Ember.Object.extend({
firebaseSimpleLogin: null,
user: null,
@zero-is-one
zero-is-one / gist:9394681
Created March 6, 2014 17:17
Example using Guzzle with the Shapeways api
<?php
class ShapewaysController extends BaseController {
function buildClient(){
$client = new Guzzle\Http\Client(Config::get('shapeways.base_url'));
$oauth = new Guzzle\Plugin\Oauth\OauthPlugin(array(
'consumer_key' => Config::get('shapeways.consumer_key'),
'consumer_secret' => Config::get('shapeways.consumer_secret'),
'token' => Config::get('shapeways.oauth_token'),
/**
* Filter to check for CSRF attacks from the ajax requests.
*/
Route::filter('csrf_header', function()
{
if (Session::token() != Request::header('x-csrf-token'))
{
throw new Illuminate\Session\TokenMismatchException;
}
});
@zero-is-one
zero-is-one / mail.py
Last active May 13, 2019 18:38
A simple mail server for testing. From: http://djangosnippets.org/snippets/96/
from datetime import datetime
import asyncore
from smtpd import SMTPServer
class EmlServer(SMTPServer):
no = 0
def process_message(self, peer, mailfrom, rcpttos, data):
filename = 'mail.eml'
f = open(filename, 'w')
f.write(data)
var letters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
var words = []
for (var i = 0; i < letters.length; i++)
for (var j = 0; j < letters.length; j++)
for (var k = 0; k < letters.length; k++)
for (var l = 0; l < letters.length; l++)
for (var m = 0; m < letters.length; m++)
if (isPronounceable(letters[i]+letters[j]+letters[k]+letters[l]+letters[m]))
words.push(letters[i]+letters[j]+letters[k]+letters[l]+letters[m])
@zero-is-one
zero-is-one / gist:5767767
Last active December 18, 2015 10:19
playing around with 3d cube
<!DOCTYPE html>
<html lang="en">
<head>
<title>three.js canvas - geometry - head</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
font-family: Monospace;
background-color: #f0f0f0;