Skip to content

Instantly share code, notes, and snippets.

@esneko
esneko / extensions.js
Last active December 16, 2022 11:27
VS Code
[
{
"identifier": {
"id": "vscode.bat"
},
"preRelease": false,
"version": "1.0.0"
},
{
"identifier": {
@esneko
esneko / index.js
Created October 10, 2022 13:44
MDX
const React = require("react");
const { renderToString, renderToStaticMarkup } = require("react-dom/server");
const { build, transformSync } = require("esbuild");
const mdx = require("@mdx-js/mdx");
const requireFromString = require("require-from-string");
const ROOT_ID = "MDX_ROOT";
const esBuildMDXPlugin = ({ content }) => ({
name: "esbuild-mdx",
<!DOCTYPE html>
<html class="full-height large-screen">
<head>
<meta charset="utf-8" />
<title>CSDD eksāmeni</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:image" content="http://csnt2.csdd.lv/images/nok.png">
<!DOCTYPE html>
<html class="full-height large-screen">
<head>
<meta charset="utf-8" />
<title>CSDD eksāmeni</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:image" content="http://csnt2.csdd.lv/images/nok.png">
<meta property="og:url" content="http://csnt2.csdd.lv/?so=PyFomh8jT1">
<meta property="og:title" content="Esmu iebraucis video jautājumos!">
@esneko
esneko / extensions.txt
Created July 2, 2020 11:45
VS Code extensions
https://github.com/microsoft/vscode-remote-try-node
https://github.com/microsoft/vscode-remote-release
https://github.com/microsoft/vscode-dev-containers
https://github.com/microsoft/vscode-docker
https://github.com/microsoft/vscode-azureappservice
https://github.com/microsoft/vscode-azurefunctions
https://github.com/microsoft/vscode-azurearmtool
@esneko
esneko / LoginWithGitHub.tsx
Created May 19, 2020 17:53
OneGraph Auth
import OneGraphAuth from "onegraph-auth"
const auth = new OneGraphAuth({
appId: "cb5c93e3-027e-4516-bf87-24ec1252d0c8",
})
/* Usage:
<LoginWithGitHub oneGraphAuth={auth} onLogin={() => console.log("User has successfully logged into GitHub.")} />
*/
const LoginWithGitHub = ({ oneGraphAuth, onLogin }) =>
@esneko
esneko / log.txt
Created November 14, 2019 15:31
AWS AppSync
Stack name:
appsync-delta-api
Stack ID:
arn:aws:cloudformation:us-east-2:948919640322:stack/appsync-delta-api/af08d730-7c79-11e9-b24e-06017dd90e3a
Status:
CREATE_COMPLETE
> aws dynamodb list-tables

Keybase proof

I hereby claim:

  • I am esneko on github.
  • I am esneko (https://keybase.io/esneko) on keybase.
  • I have a public key ASDw_yszSQPLPV16Ij5NAOBRryuYzIMvo5ck_k5WllAlyAo

To claim this, I am signing this object:

export const debounce = (callback, timeout) => {
let id
return (...args) => {
clearTimeout(id)
return id = setTimeout(() => callback(...args), timeout)
}
}
@esneko
esneko / fib.js
Created April 26, 2019 07:46
Generators
function* fibonacci() {
let [prev, curr] = [0, 1]
while (true) {
[prev, curr] = [curr, prev + curr]
yield curr
}
}
for (let n of fibonacci()) {
console.log(n)