This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| emitter "github.com/emitter-io/go" | |
| ) | |
| // demo license: zT83oDV0DWY5_JysbSTPTDr8KB0AAAAAAAAAAAAAAAI |
This file contains hidden or 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
| export CLICOLOR=1 | |
| export LSCOLORS=ExFxCxDxBxegedabagacad | |
| alias rm='rm -v -i' | |
| alias mv='mv -v' | |
| alias 'cp=cp -i' | |
| alias 'mv=mv -i' | |
| alias 'ls=ls -G' | |
| alias 'll=ls -l -G' | |
| alias atom='nohup ~/Applications/Atom.app/Contents/MacOS/Atom 2>/dev/null 1>/dev/null &' |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <style> | |
| body { | |
| padding: 50px; | |
| } | |
| #bar-container { | |
| margin-top: 10px; |
This file contains hidden or 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
| var BASE = 256, | |
| PRIME = 256199087; | |
| function tonum(c){ | |
| return c.charCodeAt(0); | |
| } | |
| function mod(a, p, m){ | |
| if (p == 0) return 1; |
This file contains hidden or 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
| void A(int n, int** a, int** b, int** c){ | |
| parallel_for(0, n, [&](int k) | |
| { | |
| for (int i = 0; i<n; i++) { | |
| int r = a[i][k]; | |
| for (int j = 0; j<n; j++) | |
| c[i][j] += r * b[k][j]; | |
| } | |
| }); | |
| }; |
This file contains hidden or 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
| struct Particle { | |
| float x; | |
| float y; | |
| float z; | |
| float w; | |
| float vx; | |
| float vy; | |
| float vz; | |
| float vw; | |
| } |
This file contains hidden or 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
| // Program A: some account with associated reputation | |
| struct Account { | |
| long id; | |
| char[64] name; | |
| char[300] address; | |
| float reputation; | |
| } | |
| // we want to update and add some reputation every day | |
| void increaseReputation(){ |
This file contains hidden or 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
| { | |
| "AWSTemplateFormatVersion": "2010-09-09", | |
| "Description": "Misakai CoreOS Cluster for EC2: http://coreos.com/docs/running-coreos/cloud-providers/ec2/", | |
| "Mappings" : { | |
| "RegionMap" : { | |
| "eu-central-1" : { | |
| "AMI" : "ami-3a093a27" | |
| }, |
This file contains hidden or 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
| Service.Cors.AllowMethods | |
| = "POST,GET,PUT,DELETE,OPTIONS"; | |
| Service.Cors.AllowHeaders | |
| = "X-Requested-With,Content-Type"; | |
| Service.Cors.AllowOrigin = "*"; | |
| Service.Cors.AllowCredentials = true; | |
| Service.Cors.Enabled = true; |
This file contains hidden or 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
| [Get("/random/{min}/{max}")] | |
| public static int Random(int min, int max) | |
| { | |
| return new Random().Next(min, max); | |
| } | |
| [Post("/hello")] | |
| public object Hello(string name) | |
| { | |
| return new |
NewerOlder