Skip to content

Instantly share code, notes, and snippets.

View jamesseanwright's full-sized avatar
🤔

James Wright jamesseanwright

🤔
View GitHub Profile
@pisarukv
pisarukv / read.go
Last active May 21, 2024 08:08
read.go
package docker
import (
"context"
"io"
"github.com/ory/dockertest"
"github.com/ory/dockertest/docker"
)
@thatisuday
thatisuday / fan-in-fan-out.go
Created November 19, 2018 15:32
fan-in and fan-out concept in go lang
package main
import (
"fmt"
"sync"
)
// return channel for input numbers
func getInputChan() <-chan int {
// make return channel
input := make(chan int, 100)
@ConorOBrien-Foxx
ConorOBrien-Foxx / obfs.js
Created January 20, 2017 02:12
888 byte Hello World in JavaScript
s=((C=f=>g=>(...a)=>f(g(...a)))&&(H=a=>[...a])&&(v=c=>a=>new(c)(a)))(Set);S=n=>[n,n].map(e=>e.map?e[1]:e).map((e,i)=>e.slice(...s([i,1])));O=J=e=>n=>(e+[])[n];p=h=>!(h&(1<<31)|!h);G=global;h=(f=[][1])=>(c=+[])=>(f+[])[c];E=s=>h(s)(+[]);R=H=>L(H).reverse();s=C((d=".",Z=x=>x))(C(H)(s));D=f=>()=>C(Z)(f);Y=(f,n)=>a=>p(n)?f(Y(f,~-n)(a)):a;L=H;T=(n,i,k=n)=>p(i)?T(n+k,--i,k):S(n)[++[[]][+[]]];f=(M=J)(![]);q=W=>Y(D,W);j=q(2)(E);w=0;X=d=>O=G[(U=x=>x[t](i*z*i+z+z-w++))(16465174322)];r=C((A=h(F=(()=>G)[c=`constructor`]),F)(b=[921631607,1061308,1160108].map(e=>e[t=`${o=(I=++i/0+[])[z=3<<1]}oS${i&&o}r${I[z/=2]}ng`]((2<<2<<2)+~-i)+[(T(A(2<<2),2)+d)[i]||[]],i=0).join``).bind({[z^i]:-192.3,[z-2]:402.4,[o+E(p)+I[z]+E(E)]:E(R)+f(2*2)+T(f(2),2)+J(c)`1`+j`````${j}`+A(2<<2)+E(q)+J(q?c:s)(J(z&~i)|1)+M(!+[])(1<<2>>2<<0)+f(2),[[14,2,3,6].map(A).join``]:640,y:420}))(X)();O[U(22288)](r+E(X)+M(p)(15));
// Talking console
//
// Support: http://caniuse.com/#search=SpeechSynthesisUtterance
//
// Copy paste the code into dev console or
// use http://mrcoles.com/bookmarklet/ to create a bookmarklet.
/* ✂️ ......................................................................................... */
if(console.log.name !== 'talkLog') {
console.l = console.log;
@BojanStipic
BojanStipic / fonts.conf
Last active April 27, 2019 13:56
Linux color emoji
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>sans-serif</family>
<prefer>
<family>NotoSans</family>
<family>NotoColorEmoji</family>
<family>NotoEmoji</family>
</prefer>
2d camera in canvas:
http://stackoverflow.com/questions/16919601/html5-canvas-camera-viewport-how-to-actally-do-it
Codeincomplete series on javascript games:
http://codeincomplete.com/games/
Coding Math:
http://www.codingmath.com/
Mary Rose Cook codes a Canvas game live in 30 minutes:
@thomheymann
thomheymann / function-declaration.js
Created October 5, 2015 16:50
Variable vs. function hoisting
// Both, function declaration and function body are hoisted to top of scope.
// Outside of scope, hence ReferenceError
console.log(foo); // ReferenceError: foo is not defined
(function () {
// Declaration and function body got hoisted to top of scope
console.log(foo); // [Function: foo]
console.log(foo()); // 'bar'
@ClaireNeveu
ClaireNeveu / scalaFlags
Last active July 5, 2017 17:15
Scala Flags
-Dproperty=value Pass -Dproperty=value directly to the runtime system.
-J<flag> Pass <flag> directly to the runtime system.
-P:<plugin>:<opt> Pass an option to a plugin
-X Print a synopsis of advanced options.
-bootclasspath <path> Override location of bootstrap class files.
-classpath <path> Specify where to find user class files.
-d <directory|jar> destination for generated classfiles.
-dependencyfile <file> Set dependency tracking file.
-deprecation Emit warning and location for usages of deprecated APIs.
-encoding <encoding> Specify character encoding used by source files.
@sebmarkbage
sebmarkbage / react_legacyfactory.md
Last active March 15, 2020 00:32
Use a factory or JSX

React Element Factories and JSX

You probably came here because your code is calling your component as a plain function call. This is now deprecated:

var MyComponent = require('MyComponent');

function render() {
 return MyComponent({ foo: 'bar' }); // WARNING
@kevincennis
kevincennis / v8.md
Last active May 6, 2024 05:25
V8 Installation and d8 shell usage

Installing V8 on a Mac

Prerequisites

  • Install Xcode (Avaliable on the Mac App Store)
  • Install Xcode Command Line Tools (Preferences > Downloads)
  • Install depot_tools
    • $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    • $ nano ~/.zshrc
    • Add path=('/path/to/depot_tools' $path)