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
<!-- Here is a template and script for a Vue 3 component that uses Firebase/Auth SDK version 9 to implement | |
phone number authentication with reCAPTCHA verification: --> | |
<template> | |
<div class="container mx-auto"> | |
<form @submit.prevent="submitPhoneNumber" class="bg-white p-6 rounded-lg shadow-md"> | |
<label class="block font-medium text-gray-700 mb-2"> | |
Phone Number | |
</label> | |
<input | |
v-model="phoneNumber" |
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
# download 3.5.8 or neo4j-enterprise-4.0.0-alpha09mr02-unix | |
!curl https://neo4j.com/artifact.php?name=neo4j-community-3.5.8-unix.tar.gz -o neo4j.tar.gz | |
# decompress and rename | |
!tar -xf neo4j.tar.gz # or --strip-components=1 | |
!mv neo4j-community-3.5.8 nj | |
# disable password, and start server | |
!sed -i '/#dbms.security.auth_enabled/s/^#//g' nj/conf/neo4j.conf | |
!nj/bin/neo4j start |
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
# https://pypi.org/project/jupyter-datatables/ | |
!pip install jupyter-datatables | |
from jupyter_datatables import init_datatables_mode | |
init_datatables_mode() |
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 | |
# Adds R to apt and install it | |
# | |
# Instructions: | |
# sudo chmod 700 InstallR.sh | |
# ./FirstTimeInstallR.sh | |
# Install R | |
sudo echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial/" | sudo tee -a /etc/apt/sources.list |
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
sudo dpkg-reconfigure keyboard-configuration #to reconfigure your keyboard. | |
#Choose English (US) for keyboard layout (second page of configuration). | |
#Then either reboot or | |
invoke-rc.d keyboard-setup start #to reload the keymap.Code: Select all |
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
input { | |
http_poller { | |
# List of urls to hit | |
# URLs can either have a simple format for a get request | |
# Or use more complex HTTP features | |
urls => { | |
BWI => "http://services.faa.gov/airport/status/BWI?format=application/json" | |
IAD => "http://services.faa.gov/airport/status/IAD?format=application/json" | |
DCA => "http://services.faa.gov/airport/status/DCA?format=application/json" | |
} |
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 | |
# CSV to JSON converter using BASH | |
# original script from http://blog.secaserver.com/2013/12/convert-csv-json-bash/ | |
# thanks SecaGuy! | |
# Usage ./csv2json.sh input.csv > output.json | |
input=$1 | |
[ -z $1 ] && echo "No CSV input file specified" && exit 1 | |
[ ! -e $input ] && echo "Unable to locate $1" && exit 1 |
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 | |
# ingesting csv files into logstash requires removal of the header row in the | |
# first line of the file. This script processes csv files in the directory | |
# where it is executed. Script runs continuously until stopping with ctrl+Z | |
#specify directory to send files for ingest (without trailing /) | |
DEST=/home/user/Test/forIngest | |
echo "processing csv files in $(pwd) for ingest by logstash..." |
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
def l2p7(x): | |
ans = (3+x)/(x**2.) | |
print ans |
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
def l2p6(x): | |
ans = (x**3)+(2*(x**2))+(3*x)-2 | |
print ans |
NewerOlder