Skip to content

Instantly share code, notes, and snippets.

View paceaux's full-sized avatar
🌐
Obsessing with languagey things

Paceaux paceaux

🌐
Obsessing with languagey things
View GitHub Profile
@paceaux
paceaux / conjugation.go.js
Last active November 16, 2018 15:49
Verb Conjugations
const verbAspects = ['simple', 'continuous', 'perfect', 'perfectContinuous'];
const verbTenses = ['past', 'present', 'future'];
const verbMoods = ['indicative', 'imperative', 'subjunctive'];
const moods = {
indicative: {
present: {
@paceaux
paceaux / conjunctions.english.js
Created October 5, 2018 21:49
English conjunctions
/*
* Conjunctions
* https://www.english-grammar-revolution.com/list-of-conjunctions.html
*/
module.exports = [
{
conjunction: ['and'],
type: 'coordinating',
},
@paceaux
paceaux / adjectives.descriptive.english.js
Last active October 5, 2018 22:18
English Adjectives
/*
* List of Descriptive Adjectives
* https://www.ef.edu/english-resources/english-vocabulary/top-50-adjectives/
*/
module.exports = [
'able',
'bad',
'best',
'better',
@paceaux
paceaux / prepositions.english.js
Created September 17, 2018 13:39
English Prepositions for JavaScript
/*
* English preposition list
* https://www.talkenglish.com/vocabulary/top-50-prepositions.aspx
*/
module.exports = [
'of',
'with',
'at',
'from',
@paceaux
paceaux / pronouns.english.js
Last active October 5, 2018 22:17
English Pronouns module
/*
* English pronoun list
* https://www.ef.edu/english-resources/english-grammar/pronouns/
* person: 1,2,3 (first, second, third person)
* gender: f == female, m == male, n == neutral
* number: s == singular, p == plural
* referent: i == inanimate, a == animate
*/
/*
@paceaux
paceaux / gotopage.js
Last active December 5, 2017 16:54
Tridion GoToPage Bookmarklet
(function(){
function getTCM(locationURL) {
return locationURL.replace('#id=','');
}
function getItem(tcm) {
return $models.getItem(tcm);
}
@paceaux
paceaux / sorter.py
Last active October 4, 2023 15:39
Camera Phone Image Sorter
# Description:
# Sorts files created with a date and time in the file name, puts them in their respective folders
# This was created to sort images taken with a Samsung Galaxy phone
# Expected file naming convention is
# "year-month-day hour.minute.second.fileextension"
# "2017-7-5 18.23.45.jpg"
#
#
# requires Pillow:
# pip install Pillow
@paceaux
paceaux / headless-screenshots_v2.js
Last active February 20, 2024 02:54
Improved command line options for headless screenshots in Chrome
/** Pre requisites
* MAC ONLY FOR RIGHT NOW! Not my fault. We have to wait for Headless Chrome to hit Windows users
1) Make an Alias to Chrome
alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
alias chrome-canary="/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary"
2) Make Sure yarn is installed (it caches packages so you don't have to download them again)
`npm i yarn`
3) Use yarn to install dependencies:
@paceaux
paceaux / attribute-promise.js
Created June 16, 2017 21:11
A promise that can be set on an element, to resolve when that element's attributes have changed
** AttrPromise
* @param {element} DOM element. required
* @param {attributeName} String. Optional. Attribute that is expected to change.
* @param {rejectTime} Int. Optional. Seconds (not ms) to wait before rejecting. 0 means there is no reject time.
* @returns {promise}
*/
function attrPromise(element, attributeName,rejectTime = 0) {
return new Promise((resolve,reject) => {
let hasChanged = false;
@paceaux
paceaux / headless-screenshots.js
Last active November 2, 2017 09:11
Screenshot grabber that uses headless chrome (only works on mac)
/** Pre requisites
1) Make an Alias to Chrome
alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
alias chrome-canary="/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary"
2) Make Sure yarn is installed (it caches packages so you don't have to download them again)
`npm i yarn`
3) Use yarn to install dependencies:
`yarn add lighthouse`