Skip to content

Instantly share code, notes, and snippets.

@TheJLifeX
TheJLifeX / 00-hand-gesture-recognition.gif
Last active Feb 28, 2021
Simple Hand Gesture Recognition Code - Hand tracking - Mediapipe
View tagged-template-literal.js
// tagging strings
const language = 'de'
const user = {
name: 'Kent C. Dodds',
birthday: new Date(1988, 9, 18)
}
const translated = translate`
<div>
${'t.hello'} ${user.name}, ${'t.yourBirthdayIs'} ${user.birthday}
</div>
View puzzle.lisp
; John McCarthy. Puzzle Solving Program in LISP. Memo 20, Artificial Intelligence Project
; http://www.bitsavers.org/pdf/mit/ai/aim/AIM-020.pdf
; 1960
; Common Lisp translation: Rainer Joswig, 2016, joswig@lisp.de
; basically the code is unchanged, but using s-expression syntax in Common Lisp
(defparameter pzl
'((a1 (a2 a5) 7.5)
(a2 (a1 a5 a9 a3) 3.5)
@lukesims
lukesims / .gitignore
Created Oct 17, 2016
OctoberCMS .gitignore
View .gitignore
# ------------------------------------------------------------------------------
# .gitignore for OctoberCMS (http://octobercms.com/)
# Based on https://gist.github.com/salcode/b515f520d3f8207ecd04 for WordPress
# ------------------------------------------------------------------------------
# By default all files are ignored.
#
# At the end of the file you will need to whitelist themes and plugins you want
# to include in the repo.
#
# Update the {PLACEHOLDERS} to reflect your setup.
@WebRTCGame
WebRTCGame / JavascriptBooks.md
Last active Feb 28, 2021
Free Javascript Books
View JavascriptBooks.md

Useful Links

MDN JavaScript

23 Free JavaScript Books

A curated collection of awesome & free JavaScript books to help you learn the JavaScript programming language.

If you know of any other free JavaScript books that you think should be on this list, please let me know in the comments section and I will get them added.

View TypeScript-JSDoc-Guides.md

Using JSDOC-Based TypeScript

Get Started

Choose your editor

  • WebStorm, Rider
    • Partial support, not enough intelli hints
    • Toggle on TypeScript language service
  • VSCode
View Creating a static copy of a dynamic website.md

The command line, in short…

wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/

…and the options explained

  • -k : convert links to relative
  • -K : keep an original versions of files without the conversions made by wget
  • -E : rename html files to .html (if they don’t already have an htm(l) extension)
  • -r : recursive… of course we want to make a recursive copy
  • -l 10 : the maximum level of recursion. if you have a really big website you may need to put a higher number, but 10 levels should be enough.
View nvse_stewie_tweaks.ini
; Stewie Tweaks INI
; New options are generated when the game is launched
; ----------------------------------------------------------
; Preset by Axonis - January 17th 2021
; http://gist.github.com/Saxonis/6f2721d32b35231777941ee21022c1b2
; Requires Stewie's Tweaks (www.nexusmods.com/newvegas/mods/66347)
; ----------------------------------------------------------
[Tweaks]
@gorangajic
gorangajic / es6-spread-immutable-cheatsheet.md
Last active Feb 28, 2021
es6 spread immutable cheatsheet
View es6-spread-immutable-cheatsheet.md

update object

var state = {
    id: 1,
    points: 100,
    name: "Goran"
};

var newState = {
@withoutwax
withoutwax / custom_fields_devise.markdown
Last active Feb 28, 2021
Adding Custom Fields to Devise
View custom_fields_devise.markdown

Adding Custom Fields to Devise

Before doing anything, please check the versions of the gem files:

gem 'rails', '~> 5.1.4'
gem 'devise', '~> 4.4.0'

Disclaimer - This solution may not work with older versions of rails and devise. Versions listed above were the latest versions of gems which I was using at the time of creation and tests. (10 Jan 2018)