sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
libfreetype6-dev \
libpng12-dev \
libzmq3-dev \
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace project | |
{ | |
// ... | |
public class AccountsController : Controller { | |
// ... | |
[HttpGet, Route("accounts/manage/change-passwords", Name="change-password")] | |
[Authorize(Roles="Admin")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
Src Reference: http://bernaerts.dyndns.org/download/ubuntu/install-mozilla-addon Article: http://bernaerts.dyndns.org/linux/74-ubuntu/271-ubuntu-firefox-thunderbird-addon-commandline
sudo apt-get install xvfb
sudo Xvfb :99.0 -ac
export DISPLAY=:99.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Attributes.Jobs; | |
namespace ForEachVsAddRange | |
{ | |
[MemoryDiagnoser] | |
public class Benchmark | |
{ |
Testing subscript and superscript
Testing subscript subscript level 2
Testing superscript superscript level 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -> Soldity | |
// ********** | |
// Your Soldity contract | |
event Created(bytes32 indexed identifier); | |
contract MyContract { | |
function MyContract(bytes32 identifier) { | |
Created(identifier); | |
} |