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
isAtScrollBottom() { | |
//https://gist.github.com/nathansmith/8939548 | |
//https://www.quora.com/How-do-you-detect-in-JavaScript-when-a-user-has-scrolled-to-the-bottom-of-the-page | |
//https://stackoverflow.com/questions/1145850/how-to-get-height-of-entire-document-with-javascript | |
//https://techstacker.com/posts/gGyGTHysrPuuJnNBk/vanilla-javascript-detect-when-user-scrolled-to-the-bottom | |
let body = document.body; | |
let html = document.documentElement; | |
var height = Math.max(body.scrollHeight, body.offsetHeight, | |
html.clientHeight, html.scrollHeight, html.offsetHeight); |
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
version: '3' | |
services: | |
redis: | |
container_name: redis | |
hostname: redis | |
image: redis | |
command: ["redis-server", "--appendonly", "yes"] | |
volumes: | |
- ~/redis/data:/data | |
ports: |
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
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Map.Entry; | |
import java.util.TreeMap; | |
import java.util.stream.Collectors; | |
import java.util.stream.Stream; | |
import javafx.util.Pair; |
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
/* | |
package.json | |
{ | |
"name": "survey-css", | |
"version": "1.0.0", | |
"main": "index.js", | |
"scripts": { | |
"start": "node get a job" | |
}, |
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
package com.dhenton9000.anttask; | |
import java.io.File; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.io.IOException; | |
import java.nio.file.FileVisitOption; | |
import java.nio.file.Files; | |
import java.nio.file.LinkOption; | |
import java.nio.file.Path; |
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
#!/usr/bin/env bash | |
{ # this ensures the entire script is downloaded # | |
nvm_has() { | |
type "$1" > /dev/null 2>&1 | |
} | |
nvm_install_dir() { | |
echo "${NVM_DIR:-"$HOME/.nvm"}" |
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/sh | |
# run this as the ec2-user | |
# java | |
# https://gist.github.com/rtfpessoa/17752cbf7156bdf32c59 | |
wget --no-cookies --header "Cookie: gpw_e24=xxx; oraclelicense=accept-securebackup-cookie;" http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.rpm | |
sudo rpm -i jdk-8u144-linux-x64.rpm | |
export JAVA_HOME=user/java/default |
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'); | |
var gutil = require('gulp-util'); | |
var source = require('vinyl-source-stream'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var reactify = require('reactify'); | |
var notifier = require('node-notifier'); | |
var server = require('gulp-server-livereload'); | |
var concat = require('gulp-concat'); | |
var sass = require('gulp-sass'); |
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
// Takes a URL, param name, and data string | |
// Sends to the server.. The server can respond with binary data to download | |
jQuery.download = function(url, key, data){ | |
// Build a form | |
var form = $('<form></form>').attr('action', url).attr('method', 'post'); | |
// Add the one key/value | |
form.append($("<input></input>").attr('type', 'hidden').attr('name', key).attr('value', data)); | |
//send request | |
form.appendTo('body').submit().remove(); |
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'); | |
var sass = require('gulp-sass'); | |
var concat = require('gulp-concat'); | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var watch = require('gulp-watch'); | |
var server = require('gulp-server-livereload'); | |
var livereload = require('gulp-livereload'); | |
var del = require('del'); |