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
| <!-- AIzaSyCgopc33y7c2axwfdoU3XDc6jjXwJ0cuVU --> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Road Trip Map</title> | |
| <script src="https://maps.googleapis.com/maps/api/js?key={YOUR_OWN_KEY}"></script> | |
| <script> | |
| function initMap() { | |
| // Create a map object and specify the DOM element for display. |
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
| from sklearn import preprocessing | |
| from sklearn import utils | |
| df = pd.read_csv('../data/nyrr/racer_races_3_3_6.csv') | |
| # x = df[df.columns.difference(['fitness_score'])] | |
| x = df[['mean']] | |
| y = df['fitness_score'] | |
| #convert y values to categorical values | |
| lab = preprocessing.LabelEncoder() |
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
| -- MySQL Script generated by MySQL Workbench | |
| -- Thu Aug 25 12:17:47 2022 | |
| -- Model: New Model Version: 1.0 | |
| -- MySQL Workbench Forward Engineering | |
| SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; | |
| SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; | |
| SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'; | |
| -- ----------------------------------------------------- |
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 | |
| # wget --no-parent --wait=20 --limit-rate=20K -r -p -U Mozilla https://walkccc.github.io/CLRS/ | |
| list=$(lynx -dump -listonly https://walkccc.github.io/CLRS/ | grep -I --color 'CLRS/Chap' | awk '{print $2}') | |
| # list=$(wget --spider --force-html --no-parent --timestamping -r -l1 https://walkccc.github.io/CLRS/ 2>&1 | ag -v 'Saving to' | ag 'CLRS/Chap[0-9]+(0-9|-|\.|.)*/$' | awk '{print $3}') | |
| for link in $list | |
| do | |
| #echo $link | |
| filename=$(echo $link | sed "s/-/_/g" | sed "s/\./_/g" | awk 'BEGIN { FS = "/" } ; {print $(NF-1)}') | |
| /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --headless --disable-gpu --print-to-pdf=$filename.pdf $link 2>&1 |
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
| <!--- Add the following filter to the ${TOMCAT_HOME}/conf/web.xml ---> | |
| <filter> | |
| <filter-name>Remote Host Filter</filter-name> | |
| <filter-class>org.apache.catalina.filters.RemoteHostFilter</filter-class> | |
| <init-param> | |
| <param-name>allow</param-name> | |
| <param-value>atv\.elab\.io\|sub2\.elab.\io</param-value> | |
| </init-param> | |
| </filter> |
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
| <?php | |
| // https://www.drupal.org/node/2780147 | |
| $context = stream_context_create(['ssl' => [ | |
| 'ciphers' => 'TLSv1', | |
| 'SNI_enabled' => FALSE, | |
| 'verify_peer' => false, | |
| 'verify_peer_name' => false, | |
| 'allow_self_signed' => true | |
| ]]); |
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 | |
| url=http://www.elab.io/test.pdf | |
| if curl --output /dev/null --silent --head --fail "$url"; then | |
| echo "URL exists: $url" | |
| echo "Just a test from a sendbox" | mail -s "File still there" {your_email} | |
| else | |
| echo "URL does not exist: $url" | |
| echo "Just a test from a sendbox" | mail -s "File just got deleted" {your_email} | |
| fi |
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
| Ref: http://stackoverflow.com/questions/15185661/update-openssl-on-os-x-with-homebrew | |
| ``` | |
| 1. Make sure openssl is installed via homebrew | |
| homebrew install openssl | |
| 2. if /usr/local/bin is not already the first item in the $PATH, modify the PATH variable | |
| set -gx PATH /user/local/bin $PATH | |
| 3. Make symlink to the binary |
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 | |
| drush cc all | |
| rm -rf sites/default/files/less | |
| find .sites/default/files -type f -name '*.ppt' -print0 | xargs -0 sudo /bin/rm -f | |
| find .sites/default/files -type f -name '*.doc' -print0 | xargs -0 sudo /bin/rm -f | |
| find .sites/default/files -type f -name '*.pdf' -print0 | xargs -0 sudo /bin/rm -f |
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
| # Reference: http://unix.stackexchange.com/questions/41550/find-the-total-size-of-certain-files-within-a-directory-branch | |
| find sites/default/files/ -type f -name '*.pdf' -exec du -ch {} + |
NewerOlder