Skip to content

Instantly share code, notes, and snippets.

View CraigMorton's full-sized avatar

Craig Morton CraigMorton

View GitHub Profile
@CraigMorton
CraigMorton / History|-16079449|entries.json
Last active January 2, 2024 19:21
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///Users/craig/wd/clicker_rpg/src/state/queue.ts","entries":[{"id":"hBtk.ts","timestamp":1675706728807},{"id":"IMZ4.ts","timestamp":1675706773377},{"id":"R1uL.ts","timestamp":1675706809037},{"id":"lIDB.ts","timestamp":1675706859832},{"id":"8Ijn.ts","timestamp":1675706878092},{"id":"ppsg.ts","timestamp":1675706895843},{"id":"Notm.ts","timestamp":1675707313532},{"id":"LoIc.ts","timestamp":1675728936484},{"id":"5sGy.ts","timestamp":1675729071257},{"id":"zeOB.ts","timestamp":1675729107858},{"id":"Xr9d.ts","timestamp":1675729130863},{"id":"ufhD.ts","timestamp":1675729236468},{"id":"yp6Y.ts","timestamp":1675729263876},{"id":"1g7v.ts","timestamp":1675729318527},{"id":"al0B.ts","timestamp":1675729363352},{"id":"w1lZ.ts","timestamp":1675729397174},{"id":"yro5.ts","timestamp":1675731372650},{"id":"Q1fd.ts","timestamp":1675734460778},{"id":"ADKf.ts","timestamp":1675772760379}]}
@CraigMorton
CraigMorton / cloudSettings
Created January 28, 2019 15:34
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-01-28T15:34:09.186Z","extensionVersion":"v3.1.2"}
@gaearon
gaearon / prepack-gentle-intro-1.md
Last active May 3, 2024 12:56
A Gentle Introduction to Prepack, Part 1

Note:

When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.

A Gentle Introduction to Prepack (Part 1)

If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:

  • Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.

Connecting to a SQLite database on an Android emulator

To access your database via the terminal, make sure that your emulator is running before doing the following:

  1. Get a list of your emulators by typing: ~/Library/Android/Sdk/platform-tools/adb devices

  2. Connect to the emulator you're running your app on: ~/Library/Android/Sdk/platform-tools/adb -s emulator-**** shell

(replace the **** with the correct number for your device, which you will have seen after running the previous command) You are now navigating the file structure of your emulator.

@eduncan911
eduncan911 / Revert-Gist.md
Last active November 1, 2024 16:54
Revert Gist Commits

Revert / Undo a Gist Commit

It was not exactly obvious. Here's how to revert a Gist commit!

Checkout the gist like a normal git repo:

# replace the Gist ID with your own
git clone [email protected]:cc13e0fcf2c348cc126f918e4a3917eb.git

Treat it like a normal repo. Edit, force push, etc.

@dominicfraser
dominicfraser / postgres_server_connection_setup.md
Last active July 9, 2017 19:42
Adding PostgreSQL to a Javascript server tied to a React client.

Connecting PostgreSQL to a Javascript server

The full context of the code shown here can be viewed here

|-- package.json
|-- config.js
|-- db
    |-- pgHelper.js
 |-- dbQueryHelper.js

"Hey Alan..."

"I already commited my Node.js project, but I forgot to add node_modules to a gitignore. How fucked am I??"

It's cool, don't panic. First make your gitignore file:

$ touch .gitignore
@mxstbr
mxstbr / Readme.md
Last active October 20, 2024 20:44
Enable tab completion for JSX with Emmet in Atom

Enable tab completion for JSX with Emmet in Atom

This guide assumes you have the emmet and language-babel packages already installed in Atom

Gif of the tab completion working

  1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
  2. Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':