View main.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import network | |
import socket | |
import machine | |
import ujson | |
import utime | |
SSID = 'NAME' | |
PASSWORD = 'PASSWORD' | |
def connect_to_wifi(ssid, password): |
View RBZ-install-programs.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install Oh My Zsh | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
# Reload Oh My Zsh | |
exec zsh | |
# Function to check if a command is installed | |
check_command_installed() { |
View Node-RED Sense HAT Wordle Generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "a48e0b927d58bcd2", | |
"type": "tab", | |
"label": "Wordle Generator", | |
"disabled": false, | |
"info": "", | |
"env": [] | |
}, | |
{ |
View internet-monitor-node-red
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "fee7a583aa5c9a4b", | |
"type": "tab", | |
"label": "Internet Monitor", | |
"disabled": false, | |
"info": "", | |
"env": [] | |
}, | |
{ |
View load-google-analytics-in-webpack.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const analyticsId = 'XX-XXXXXX'; | |
window.ga = window.ga || ((...args) => (ga.q = ga.q || []).push(args)); | |
ga('create', `UA-${analyticsId}-Y`, 'none'); | |
const gaLoader = document.createElement('script'); | |
gaLoader.src = 'https://www.google-analytics.com/analytics.js'; | |
gaLoader.async = true; | |
document.querySelector('head').appendChild(gaLoader); |
View add-ignore.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable angular/log,no-console,angular/json-functions,no-loop-func */ | |
const fs = require('fs'); | |
const glob = require('glob'); | |
const pathToFiles = './src/**/*.less'; | |
const disableString = '/* stylelint-disable */'; | |
const files = glob.sync(pathToFiles, { cwd: './', realpath: true }); | |
for (const file of files) { | |
const content = fs.readFileSync(file, 'utf8'); |
View pageObjectExample.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var myPage = function () { | |
browser.driver.manage().window().maximize(); | |
}; | |
myPage.prototype = Object.create({}, { | |
loadingBarSettings: { get: function () { return element(by.xpath('//div[@class="snake-foreground"]/div[3]')); } }, | |
productNameHeader: { get: function () { return element(by.css('h2.ng-binding')); } }, | |
productContentOwnersButton: { get: function () { return element(by.xpath('//span[contains(@class, "my-badge-text") and text() = "Content Owners"]')); } }, |
View fix-all.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call C:\Users\USER\AppData\Roaming\npm\eslint -c C:\PROJECT\client\.eslintrc C:\PROJECT\client\app\**\*.js --ignore-pattern *.spec.js --fix | |
call C:\Users\USER\AppData\Roaming\npm\eslint -c C:\PROJECT\client\.eslintrc-spec C:\PROJECT\client\app\**\*.spec.js --fix | |
call C:\Users\USER\AppData\Roaming\npm\eslint -c C:\PROJECT\server\.eslintrc C:\PROJECT\server\app\**\*.js --ignore-pattern *.spec.js --fix | |
call C:\Users\USER\AppData\Roaming\npm\eslint -c C:\PROJECT\server\.eslintrc-spec C:\PROJECT\server\app\**\*.spec.js --fix |
View maxlengthescaped.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The max-length-escaped directive testing the length against escaped | |
* value. Prevent sending exceeding escaped length input to server\API that enforce size. | |
* | |
* Usage: | |
* <input type="text" max-length-escaped="250" /> || <textarea max-length-escaped="1000"></textarea> | |
* | |
* License: MIT | |
*/ |
View .gitconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Based on http://haacked.com/archive/2014/07/28/github-flow-aliases/ | |
[alias] | |
co = checkout | |
ec = config --global -e | |
up = !git pull --rebase --prune $@ && git submodule update --init --recursive | |
cob = checkout -b | |
cm = !git add -A && git commit -m | |
save = "!f(){ ARG1=${1:-SAVEPOINT}; git add -A && git commit -m \"$ARG1\"; };f" | |
wip = !git add -u && git commit -m "WIP" |
NewerOlder