Skip to content

Instantly share code, notes, and snippets.

@theednaffattack
theednaffattack / xdm-solid.ts
Created February 28, 2022 16:12 — forked from CyriacBr/xdm-solid.ts
Support SolidJs inside MDX files
import { compile } from 'xdm';
import * as Path from 'path';
import * as fs from 'fs';
import * as babel from '@babel/core';
import esbuild from 'esbuild';
async function main() {
/**
* Compile MDX file with XDM
*/
@theednaffattack
theednaffattack / eslint-package-json.js
Created February 21, 2022 22:45 — forked from richardtallent/eslint-package-json.js
Example eslint config in a package.json
"prettier": {
"useTabs": true,
"semi": false,
"singleQuote": false,
"bracketSpacing": true,
"trailingComma": "es5",
"printWidth": 160
},
"eslintConfig": {
"parserOptions": {
@theednaffattack
theednaffattack / Readme.md
Created November 8, 2020 21:25 — forked from leopoldodonnell/Readme.md
Install and run Postgres with an extension using docker-compose

Local Postgres

This gist is an example of how you can simply install and run and extended Postgres using docker-compose. It assumes that you have docker and docker-compose installed and running on your workstation.

Install

  • Requires docker and docker-compose
  • Clone via http: git clone https://gist.github.com/b0b7e06943bd389560184d948bdc2d5b.git
  • Make load-extensions.sh executable
  • Build the image: docker-compose build
@theednaffattack
theednaffattack / README.md
Created October 26, 2017 18:30 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@theednaffattack
theednaffattack / letsencrypt_2017.md
Created August 28, 2017 18:15 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

@theednaffattack
theednaffattack / .gitconfig
Last active July 13, 2017 07:35 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Eddie Naff
email = eddienaff@gmail.com
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
@theednaffattack
theednaffattack / Full Stack JavaScript.md
Last active March 16, 2017 17:38 — forked from m0n01d/Full Stack JavaScript.md
Learn Full Stack JavaScript Web Development for FREE using resources like YouTube, Udacity and NodeSchool
# Motion export script
rad2deg = 180/3.14159265
import bpy
import math
from math import sqrt
sce = bpy.context.scene
saveFile = open("/Users/h/Documents/BlenderPlayback.csv","w")
@theednaffattack
theednaffattack / loader.html
Created August 25, 2016 01:05 — forked from bellbind/loader.html
[threejs][html5]STL File Viewer with HTML5 File API
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>STL File Viewer</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r68/three.min.js"
></script>
<script src="https://rawgit.com/mrdoob/three.js/master/examples/js/controls/TrackballControls.js"
></script>
<script src="loader.js"></script>