This files contains my boilerplates for jQuery plugins.
This file contains hidden or 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
// Ajax File upload with jQuery and XHR2 | |
// Sean Clark http://square-bracket.com | |
// xhr2 file upload | |
// data is optional | |
$.fn.upload = function(remote,data,successFn,progressFn) { | |
// if we dont have post data, move it along | |
if(typeof data != "object") { | |
progressFn = successFn; | |
successFn = data; | |
} |
This file contains hidden or 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
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
browserify = require('gulp-browserify'), | |
concat = require('gulp-concat'), | |
embedlr = require('gulp-embedlr'), | |
refresh = require('gulp-livereload'), | |
lrserver = require('tiny-lr')(), | |
express = require('express'), | |
livereload = require('connect-livereload') | |
livereloadport = 35729, |
This file contains hidden or 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
var fs = require('fs'); | |
// Specify the locales you are interested here. | |
var locales = ['en', 'fr']; | |
var i; | |
var localesData = Object.create(null); | |
var prefix = 'data:text/javascript;base64,'; | |
var outputPrefix = "angular.module('tmh.dynamicLocalePreload', ['tmh.dynamicLocale'])" + | |
".config(['tmhDynamicLocaleProvider', function(tmhDynamicLocaleProvider) {" + | |
"tmhDynamicLocaleProvider.localeLocationPattern('{{base64Locales[locale]}}');" + |
#Headless Setup of Raspberry Pi Zero W (Raspberry Pi 3 Wireless) (macOS)
- Formatt the Micro SD card - Open a terminal and type 'diskutil list'. Find your card and copy the disk name (For example: /dev/disk4). Format the card with
diskutil eraseDisk ExFat temp disk4(Use your disk here)
- Download Raspbian -
wget https://downloads.raspberrypi.org/raspbian_lite_latest
- Unmount the SD card -
diskutil unmountDisk /dev/disk4
or whatever your disk path is - Mount the Raspbian image to the card -
sudo dd if=PATH-TO-RASPBIAN-IMAGE
of=/dev/disk4` or whatever your disk path is - Enable SSH on the Pi -
cd /volumes && ls
. You should see a boot partition from the SD cardcd boot && touch ssh
- Setup WiFi on the PI - While still in the boot partition of the card type
nano wpa_supplicant.conf
and enternetwork={ ssid="YOUR-SSID" psk="YOUR-WIFI-PASSWORD" }
- Boot the PI - Unmount the card
diskutil unmountDisk /dev/disk4
(or whatever your disk path is) and put it in the
This file contains hidden or 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 | |
# ------------------------------------------------- | |
# Get monitors configuration from monitor.xml and apply it for current user session. | |
# In case of multiple definitions in monitor.xml only first one is used. | |
# | |
# See http://bernaerts.dyndns.org/linux/74-ubuntu/309-ubuntu-dual-display-monitor-position-lost | |
# for instructions | |
# | |
# Revision history : | |
# 19/04/2014, V1.0 - Creation by N. Bernaerts |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This file contains hidden or 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
#include <SPIFFS.h> | |
/* | |
* | |
* Copyright (C) 2017 CS.NOL https://github.com/csnol/1CHIP-Programmers | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, | |
* and You have to keep below webserver code |
This file contains hidden or 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
echo '.env' >> .gitignore | |
git rm -r --cached .env | |
git add .gitignore | |
git commit -m 'untracking .env' | |
git push origin master |
This file contains hidden or 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
let mapleader=" " | |
""" Plugins -------------------------------- | |
set surround | |
set multiple-cursors | |
set commentary | |
set argtextobj | |
set easymotion | |
set textobj-entire | |
set ReplaceWithRegister |
OlderNewer