class MyLogicContainer {
constructor(private x: number) { }
add(y: number) {
return this.x + y;
}
}
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
package main | |
import ( | |
"database/sql" | |
"encoding/csv" | |
"fmt" | |
"io" | |
"log" | |
"os" | |
"sync" |
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 math | |
from machine import Pin, I2C | |
from ssd1306 import SSD1306_I2C | |
i2c=I2C(1,sda=Pin(26), scl=Pin(27), freq=400000) | |
oled = SSD1306_I2C(128, 64, i2c) | |
class Point3D : | |
x = 0; | |
y = 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
fileInput.addEventListener('input', function(){ | |
fileInput.files[0].arrayBuffer().then(function(x){ | |
const data = new Uint8Array(x[0]); | |
// send the data to Go (it only accepts bytes as Uint8Array's | |
}) | |
}); |
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
package main | |
import ( | |
"syscall/js" | |
) | |
func main() { | |
quit := make(chan struct{}, 0) | |
document := js.Global().Get("document") |
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
<html> | |
<body> | |
<img src="tumblr_ngqdgj3vqt1sulnzno1_500.gif"> | |
<img src="tumblr_ngqdgj3vqt1sulnzno1_500.gif" width="100"> | |
<img src="tumblr_ngqdgj3vqt1sulnzno1_500.gif" style="width: 30px; height: 200px;"> | |
<br> | |
<button onclick="play()">Play</button> | |
<button onclick="pause()">Pause</button> |
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
#!/usr/bin/env php | |
<?php | |
date_default_timezone_set('UTC'); | |
$stderr = fopen('php://stderr', 'wb'); | |
$shift = 0.0; | |
switch( $argv[1] ?? '' ) { | |
case 'shift': |
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
cat package-lock.json | jq -r '.. | select(.>={}) | .dependencies | select(. != null) | to_entries[] | .key + ": " + .value.version' | sort | uniq |
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
#!/bin/bash | |
set -e | |
blame=$(git blame "$1" -L "$2,$2" -p) | |
open "https://github.com/search?type=Issues&q=${blame:0:40}" |
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
<?php | |
$content =' | |
"${folder}\\\\"; | |
if (!isset($data[\'file\'])) { die("This doesn\'t appear to be a language constant file".nl); } | |
$translation = trim($value,"\' \\t\\n\\r\\0\\x0B"); | |
\'es_ni\'=>\'Spanish (Nicaragua)\', | |
\'es_pa\'=>\'Spanish (Panama)\', | |
\'es_pe\'=>\'Spanish (Peru)\', | |
\'es_pr\'=>\'Spanish (Puerto Rico)\', |
NewerOlder