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 | |
./configure \ | |
--sbin-path=/usr/sbin/nginx \ | |
--conf-path=/etc/nginx/nginx.conf \ | |
--pid-path=/var/run/nginx.pid \ | |
--with-http_ssl_module \ | |
--with-http_v2_module \ | |
--with-http_gzip_static_module \ | |
--with-pcre=../pcre-8.38 \ | |
--with-zlib=../zlib-1.2.8 |
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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
tagName: 'audio', | |
attributeBindings: ['src', 'preload'], | |
src: Ember.computed.alias('url'), | |
preload: 'none', | |
didInsertElement() { | |
let _this = this; | |
audiojs.events.ready(function() { |
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 | |
sudo dd bs=4M if=archlinux-2016.03.01-dual.iso of=/dev/sdd status=progress && sync |
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 | |
# Usage: ./replace.sh | |
#* Adapted from slides by Reva Freedman (The UNIX Systems), NIU | |
### Feng Chen | |
### Tue/Thu 5:00-6:30PM | |
#1120 Patrick F. Taylor Hall | |
# https://github.com/selbyk/operating-systems |
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 | |
# Usage: ./process_pids.sh | |
for proc in /proc/* | |
do | |
FILENAME=${proc##*/} | |
if [[ $FILENAME =~ ^-?[0-9]+ ]] | |
then | |
echo $FILENAME | |
fi |
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 | |
# Usage: ./find_running_process.sh <process_name> | |
# DEBUG=1 ./find_running_process.sh <process_name> | |
# Function to help with debug messages | |
debug_message () { | |
if [ $DEBUG -eq 1 ] | |
then | |
echo $1 | |
fi |
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
Scraper/Content Extraction Training | |
Goal: Fetch relevant information sources, extract only appropriate content, save as documents as training data and usable by Watson | |
Method: | |
Fetch a few pages from various data sources using Phantom.js, then parse and save the website’s HTML as JSON | |
Iterate the text elements and extract features such as size, position, text, CSS properties, etc | |
Run the DBSCAN clustering algorithm over the document’s extracted feature data. Similar elements such as titles, headers, and article content should be grouped into the same clusters | |
Manually tag a portion of the documents to use as training data | |
A support vector machine (SVM) with linear kernel using a 4-fold cross validation should be capable of detecting the main content of a scraped page |
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 | |
# Set to number of cores your computer has or you want to use | |
export MAGICK_THREAD_LIMIT=8 | |
# Deleted old files | |
rm *.jpg | |
rm *.png | |
rm *.gif | |
rm *.mp4 |
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 | |
rm *.jpg | |
rm *.png | |
rm *.gif | |
rm *.mp4 | |
find ../ -mindepth 1 -maxdepth 1 -mtime -7 -name "*.jpg" -exec cp -t . {} + | |
export MAGICK_THREAD_LIMIT=4 |
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
# This is an example of the kind of things you can do in a configuration file. | |
# All flags used by the client can be configured here. Run Let's Encrypt with | |
# "--help" to learn more about the available options. | |
# Use a 4096 bit RSA key instead of 2048 | |
rsa-key-size = 4096 | |
# Always use the staging/testing server | |
server = https://acme-v01.api.letsencrypt.org/directory |