Skip to content

Instantly share code, notes, and snippets.

View skynode's full-sized avatar
💭
I may be slow to respond.

Obi skynode

💭
I may be slow to respond.
  • Amsterdam, The Netherlands
View GitHub Profile
@skynode
skynode / AccountsController.cs
Created June 20, 2017 01:46 — forked from happygrizzly/AccountsController.cs
ValidationSummaryMultipleForms
namespace project
{
// ...
public class AccountsController : Controller {
// ...
[HttpGet, Route("accounts/manage/change-passwords", Name="change-password")]
[Authorize(Roles="Admin")]
@skynode
skynode / schema.js
Created June 21, 2017 20:11 — forked from koistya/schema.js
How to create a Hacker News API with Node.js and GraphQL https://medium.com/p/3b13ef04ec0f
import { GraphQLSchema, GraphQLObjectType } from 'graphql';
import { nodeField, nodesField } from './types/Node';
import StoryType from './types/StoryType';
import UserType from './types/UserType';
import StoryMutations from './mutations/StoryMutations';
import CommentMutations from './mutations/CommentMutations';
export default new GraphQLSchema({
query: new GraphQLObjectType({
@skynode
skynode / install_TensorFlow_on_Windows_10_Bash.md
Created June 25, 2017 11:34 — forked from wall72/install_TensorFlow_on_Windows_10_Bash.md
install TensorFlow on Windows 10 Bash (include graphiclib)

install TensorFlow on Windows 10 Bash (include graphiclib)

1. install packages

sudo apt-get update
sudo apt-get install -y --no-install-recommends \
        build-essential \
        libfreetype6-dev \
        libpng12-dev \
        libzmq3-dev \
@skynode
skynode / es7-async-await.js
Created July 13, 2017 20:12 — forked from msmfsd/es7-async-await.js
Javascript fetch JSON with ES7 Async Await
// Async/Await requirements: Latest Chrome/FF browser or Babel: https://babeljs.io/docs/plugins/transform-async-to-generator/
// Fetch requirements: Latest Chrome/FF browser or Github fetch polyfill: https://github.com/github/fetch
// async function
async function fetchAsync () {
// await response of fetch call
let response = await fetch('https://api.github.com');
// only proceed once promise is resolved
let data = await response.json();
// only proceed once second promise is resolved
@skynode
skynode / HttpClientExtensions.cs
Created October 5, 2017 00:44 — forked from alexandrevicenzi/HttpClientExtensions.cs
C# Post, Put and Patch as JSON async extensions
using System;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Threading.Tasks;
namespace MyProject.Extensions
{
public static class HttpClientEx
{
public const string MimeJson = "application/json";
@skynode
skynode / README.md
Created October 9, 2017 02:00 — forked from eddiejaoude/README.md
Install Firefox addon/extension with no user interaction
@skynode
skynode / Benchmark.cs
Created November 9, 2017 21:33 — forked from mcliment/Benchmark.cs
Test to check the speed of List.ForEach vs List.AddRange
using System;
using System.Collections.Generic;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes.Jobs;
namespace ForEachVsAddRange
{
[MemoryDiagnoser]
public class Benchmark
{
@skynode
skynode / bibtex.png
Created November 21, 2017 22:30 — forked from max-mapper/bibtex.png
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@skynode
skynode / gist:493ff03b274d4df477392f38bf21c40f
Created December 10, 2017 15:53 — forked from bt5e/gist:7507535
Markdown subscript and superscript

Testing subscript and superscript

Testing subscript subscript level 2

Testing superscript superscript level 2

@skynode
skynode / createContract.js
Created March 31, 2018 22:58 — forked from frozeman/createContract.js
Deploy contracts on Ethereum and reliable get the contract address
// -> Soldity
// **********
// Your Soldity contract
event Created(bytes32 indexed identifier);
contract MyContract {
function MyContract(bytes32 identifier) {
Created(identifier);
}