Skip to content

Instantly share code, notes, and snippets.

View masterial's full-sized avatar
:electron:

Konstantin Yurchenko, Jr. masterial

:electron:
View GitHub Profile
@shigahi
shigahi / raiden_aws_ubuntu.sh
Last active March 23, 2018 22:27 — forked from Sulejman/PrepareRaiden.sh
Install environment for Raiden on Ubuntu on AWS
#!/bin/sh
sudo apt-get update
# install dependencies and npm 依存パッケージとnpmのインストール
sudo apt-get install build-essential automake pkg-config libtool libffi-dev libgmp-dev libwww-perl nodejs npm python3-pip python-pip -y
sudo npm install -g n
sudo n latest
sudo npm i npm@4 -g
@valyard
valyard / Jobs_and_ecs.cs
Created July 10, 2017 20:20
"Slides" about C# Job System and ESC in Unity.
// ######################################################################
//
// We want you to write more efficient code
//
// ######################################################################
But, we teach the opposite...
You know, GameObjects and Components.
...
@danielbierwirth
danielbierwirth / TCPTestClient.cs
Last active August 17, 2024 07:19
TCP Client-Server Connection Example | Unity | C# | Bidirectional communication sample: Client can connect to server; Client can send and receive messages: Server accepts clients; Server reads client messages; Server sends messages to client
// This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/
// or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using UnityEngine;
@lmars
lmars / swarm-api-improvements.md
Created March 12, 2017 15:39
Swarm API improvements

Uploading files

Files can be uploaded in a single HTTP request, where the body is either a single file to store, a tar stream (application/x-tar) or a multipart form (multipart/form-data).

  • single file upload
$ curl -H "Content-Type: text/plain" --data-binary "some-data" http://localhost:8500/bzz:/
69094f7a9a04d680708596d1c0b67b0852d72d91bbaf934206c0904137c5a3c7
@tomconte
tomconte / web3-solc-contract-compile-deploy.js
Created December 13, 2016 09:32
Compiling and deploying an Ethereum Smart Contract, using solc and web3.
const fs = require('fs');
const solc = require('solc');
const Web3 = require('web3');
// Connect to local Ethereum node
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
// Compile the source code
const input = fs.readFileSync('Token.sol');
const output = solc.compile(input.toString(), 1);
@sgnl
sgnl / postgres-brew.md
Last active November 29, 2024 08:26
Installing Postgres via Brew (OSX) (outdated see top most note)

Outdated note: the process is a lot easier now: after you brew install postgresql you can initialize or stop the daemon with these commands: brew services start postgresql or brew services stop postgresql.

new out put may look like

To have launchd start postgresql now and restart at login:
  brew services start postgresql
Or, if you don't want/need a background service you can just run:
  pg_ctl -D /usr/local/var/postgres start
@JamesMessinger
JamesMessinger / IndexedDB101.js
Last active April 14, 2025 16:34
Very Simple IndexedDB Example
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
// Open (or create) the database
var open = indexedDB.open("MyDatabase", 1);
// Create the schema
open.onupgradeneeded = function() {
var db = open.result;
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"});
@uzzu
uzzu / Ease.cs
Last active December 4, 2019 06:43
ease-in and ease-out funcions for unity3d
using UnityEngine;
/// <summary>
/// Ease functions.
/// </summary>/
public static class Ease
{
#region basic easing
public static float Linear(float variation, float elapsed, float delay, float offset)
{