Skip to content

Instantly share code, notes, and snippets.

@flaviut
flaviut / Setting up Emporia Vue 2 with ESPHome.md
Last active June 6, 2024 06:00
Setting up Emporia Vue 2 with ESPHome
@ruvi-d
ruvi-d / llvm.getting.started.md
Last active May 9, 2022 23:02
Getting Started with LLVM (WIP draft)
@daybrush
daybrush / JavaScriptCore+fetch.swift
Created March 7, 2019 07:19 — forked from yycking/JavaScriptCore+fetch.swift
add fetch, console.log and Promise.then/catch to JavaScriptCore on iOS/Mac
import JavaScriptCore
extension JSContext {
subscript(key: String) -> Any {
get {
return self.objectForKeyedSubscript(key)
}
set{
self.setObject(newValue, forKeyedSubscript: key as NSCopying & NSObjectProtocol)
}
@ctkjose
ctkjose / ubuntoserver.md
Created December 15, 2018 05:43
Setup Ubunto Server

MYSQL

mysql -u root -p 

mysql> GRANT ALL PRIVILEGES ON *.* TO 'ctk'@'%' IDENTIFIED BY 'password';
mysql> flush privileges;

Enable access from an external IP

@WebReflection
WebReflection / jsc
Last active August 12, 2019 18:23
JavaScriptCore for macOS and Linux
#!/usr/bin/env bash
if [ -f /usr/lib/jsc ]; then
/usr/lib/jsc "$@"
elif [ -f /System/Library/Frameworks/JavaScriptCore.framework/Resources/jsc ]; then
/System/Library/Frameworks/JavaScriptCore.framework/Resources/jsc "$@"
fi
var str = 'class ಠ_ಠ extends Array {constructor(j = "a", ...c) {const q = (({u: e}) => {return { [`s${c}`]: Symbol(j) };})({});super(j, q, ...c);}}' +
'new Promise((f) => {const a = function* (){return "\u{20BB7}".match(/./u)[0].length === 2 || true;};for (let vre of a()) {' +
'const [uw, as, he, re] = [new Set(), new WeakSet(), new Map(), new WeakMap()];break;}f(new Proxy({}, {get: (han, h) => h in han ? han[h] ' +
': "42".repeat(0o10)}));}).then(bi => new ಠ_ಠ(bi.rd));';
try {
eval(str);
} catch(e) {
alert('Your browser does not support ES6!')
}
@zwaldowski
zwaldowski / notes-specific-to-mac-os-x-10_9.md
Last active August 7, 2023 08:34
10.9 AppKit Release Notes
@ctkjose
ctkjose / macoswebdev.md
Last active May 9, 2023 14:13
Mac OS X Web Development Notes

Setting a Mac for Web Development

These notes were update for 10.15 (Catalina)

Install brew

I use Brew to install libraries and software.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
@netpoetica
netpoetica / Compiling v8 and Hello, World Example on Mac OSX Mavericks (10.9.4).md
Last active August 7, 2022 09:25
Compiling v8 and Hello, World Example on Mac OSX Mavericks (10.9.4), Link Clang to Static Libraries, properly configure your environment for v8 build

Compiling v8 and Hello, World Example on Mac OSX Mavericks (10.9.4)

by Keith Rosenberg (netpoetica)

Note: do this in some sort of project/ directory that makes sense. depot_tools are going to need to be in your path, so you may want to install them somewhere you are comfortable with.

1) Get the v8 source

git clone https://github.com/v8/v8.git

2) Install depot tools

@phusick
phusick / hub.html
Created June 12, 2014 19:37
Event Hub
<html>
<head>
<title>Event Hub</title>
<script src="hub.js"></script>
<script>
var subscription = hub.subscribe('/go', function(params) {
console.log('one', params);
});
var subscription2 = hub.subscribe('/go', function(params) {
console.log('two', params);