Skip to content

Instantly share code, notes, and snippets.

View jdanyow's full-sized avatar
💭
Confirming my whereabouts

Jeremy Danyow jdanyow

💭
Confirming my whereabouts
View GitHub Profile
/*
-----------------------------------
Emoji - natural display for the web
-----------------------------------
These font face definitions allows to display emoji glyphs intermingled with
arbitrary characters outside emoji unicode blocks.
Usage
@addyosmani
addyosmani / package.json
Last active January 18, 2024 21:31
npm run-scripts boilerplate
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "jshint src/js/*.js",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
@NickCraver
NickCraver / Win10-DisableLockScreen.ps1
Created August 3, 2015 02:46
Disable the lock screen (the one before the password prompt) in Windows 10 for faster login and not dropping the first password character.
# Disable the Lock Screen (the one before password prompt - to prevent dropping the first character)
If (-Not (Test-Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization)) {
New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows -Name Personalization | Out-Null
}
Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization -Name NoLockScreen -Type DWord -Value 1 -Force
@NickCraver
NickCraver / Windows10-Setup.ps1
Last active April 1, 2024 10:52
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
@paulirish
paulirish / what-forces-layout.md
Last active April 16, 2024 17:32
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@omniscient
omniscient / boxstarter-dev.ps1
Last active August 12, 2016 06:15
My dev box setup
######## Boxstarter script - based on https://gist.github.com/philchuang/20bbdacffbf9ecc8cc3a#file-phil-dev-vm-boxstarter-package-ps1 ########
###############
#### notes ####
###############
### running remotely on VM fails on Configuring CredSSP settings
## check http://blogs.technet.com/b/heyscriptingguy/archive/2012/12/30/understanding-powershell-remote-management.aspx
### running locally on VM
@jdanyow
jdanyow / app.html
Last active January 29, 2024 16:16
Aurelia Gist
<template>
<h1>${message}</h1>
</template>
@xuhdev
xuhdev / gen-editorconfig-from-gitignore.sh
Last active August 3, 2016 01:11
Generate an editorconfig file from a gitignore file.
#!/bin/bash
# Generate an editorconfig file from a gitignore file. Usage:
#
# /path/to/gen-editorconfig-from-gitignore.sh < .gitignore >> .editorconfig
while read line
do
if [[ -z $line ]]
then
@mbroadst
mbroadst / ajv-validator.js
Last active August 15, 2020 15:04 — forked from jdanyow/app.html
Aurelia Validation using AJV
import {ValidationError} from 'aurelia-validation';
export class AjvValidator {
cache = new Map;
ajv = new Ajv({ v5: true, allErrors: true, format: 'full' });
validateObject(object) {
this.parseSchema(object);
let schemaId = this._schemaId(object);
if (!this.cache.has(schemaId)) {
@chrisveness
chrisveness / crypto-aes-gcm.js
Last active March 17, 2024 15:36
Uses the SubtleCrypto interface of the Web Cryptography API to encrypt and decrypt text using AES-GCM (AES Galois counter mode).
/**
* Encrypts plaintext using AES-GCM with supplied password, for decryption with aesGcmDecrypt().
* (c) Chris Veness MIT Licence
*
* @param {String} plaintext - Plaintext to be encrypted.
* @param {String} password - Password to use to encrypt plaintext.
* @returns {String} Encrypted ciphertext.
*
* @example
* const ciphertext = await aesGcmEncrypt('my secret text', 'pw');