Skip to content

Instantly share code, notes, and snippets.

View blech75's full-sized avatar
:shipit:

justin blecher blech75

:shipit:
  • BDL
  • 23:21 (UTC -05:00)
View GitHub Profile
@guest271314
guest271314 / javascript_engines_and_runtimes.md
Last active November 10, 2024 12:32
A list of JavaScript engines, runtimes, interpreters

V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.

SpiderMonkey is Mozilla’s JavaScript and WebAssembly Engine, used in Firefox, Servo and various other projects. It is written in C++, Rust and JavaScript. You can embed it into C++ and Rust projects, and it can be run as a stand-alone shell. It can also be [compiled](https://bytecodealliance.org/articles/making-javascript-run-fast-on

@xlfe
xlfe / export.py
Created June 30, 2019 05:56
Export from Google App Engine Datastore Backup LevelDB format to JSON flat file
import sys, os, json
import datetime
sys.path.append(os.path.expanduser('~/google-cloud-sdk/platform/google_appengine/'))
from google.appengine.api.files import records
from google.appengine.datastore import entity_pb
from google.appengine.api import datastore
def myconverter(o):
if isinstance(o, datetime.datetime):
@ngbrown
ngbrown / ApolloLoggingExtension.ts
Created March 29, 2019 04:00
Custom logging in Apollo Server 2 using the extension API
import {GraphQLExtension, GraphQLResponse} from 'graphql-extensions';
import {formatApolloErrors} from 'apollo-server-errors';
import {GraphQLError, GraphQLFormattedError} from 'graphql';
import Logger from 'bunyan';
import icepick from 'icepick';
const filterOutErrorPaths = [
['extensions', 'exception', 'options', 'auth', 'bearer'],
[
'extensions',
@andrewb
andrewb / memory-leak-debug.md
Created March 25, 2019 12:05
Quick guide to debugging Node memory leaks

Quick guide to debugging Node.js memory leaks

The basics

Run the app locally using the --inspect switch. For example node --inspect index.js. Note: if you are debugging a complex Next.js app (or similar) you need to use a production build, otherwise you’ll get stuck on "Building dominator tree…" (see this issue for some info). To inspect Oxygen, run yarn build and NODE_ENV=production node --inspect server.js

Open DevTools for Node. You can do this by visiting chrome://inspect/#devices and looking for your app under "Remote Target".

Screen Shot 2019-03-21 at 6 58 12 AM

@lastorset
lastorset / fetch_service_mock.py
Last active October 21, 2023 22:55 — forked from kesor/gist:1179782
Google AppEngine URLFetch in Unit Tests
from google.appengine.api import apiproxy_stub, apiproxy_stub_map, urlfetch
from google.appengine.ext import testbed
import unittest
class FetchServiceMock(apiproxy_stub.APIProxyStub):
"""
Example::
with FetchServiceMock(content='A MOCKERY', status_code=200) as fetch_mock:
ret = main.method('amok')
@redlotus
redlotus / docstrings.py
Created October 2, 2017 04:34
Google Style Python Docstrings
# -*- coding: utf-8 -*-
"""Example Google style docstrings.
This module demonstrates documentation as specified by the `Google Python
Style Guide`_. Docstrings may extend over multiple lines. Sections are created
with a section header and a colon followed by a block of indented text.
Example:
Examples can be given using either the ``Example`` or ``Examples``
sections. Sections support any reStructuredText formatting, including
@subfuzion
subfuzion / curl.md
Last active November 17, 2024 03:54
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@apolloclark
apolloclark / postgres cheatsheet.md
Last active November 15, 2024 05:23
postgres cheatsheet

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@coorasse
coorasse / main.js
Last active February 6, 2018 12:36
Bitbucket Codeship PullRequest integration script
$(function() {
var bitbucket_project_name = 'YOUR BITBUCKET PROJECT_NAME LIKE coorasse/airesis';
var codeship_project_code = 'YOUR CODESHIPO PROJECT UUID CODE (look for it in the badge instructions page or general settings page)';
var regexp = new RegExp("^https://bitbucket.org/" + bitbucket_project_name + "/pull-request/","g");
if ((regexp).test(window.location.href)) {
var branch = $('dd.unabridged a').first().html();
var url = 'https://codeship.com/projects/'+codeship_project_code+'/status?branch='+branch;
var row = $('<div></div>')
var column1 = $('<dt>Codeship</dt>');
@blech75
blech75 / README.md
Last active March 19, 2024 00:50
notify-send adapter

notify-send adapter for Mac OS X

This allows you to receive desktop notifications from grunt running inside of a local vagrant box.

How to install

Install grunt-notify and add to dev dependencies

This is done on the guest VM (within the vagrant box).