- C-a == Ctrl-a
- M-a == Alt-a
:q close
:w write/saves
:wa[!] write/save all windows [force]
:wq write/save and close
/** | |
* @name getYoutubeEmbedUrl | |
* @created 26.9.2015 | |
* @author gggordon <https://github.com/gggordon> | |
* @method | |
* @description | |
* <p>Converts URL/address of youtube video to embed url for any website</p> | |
* <u>Tested URLS:</u> | |
* <ul> | |
* <li>https://www.youtube.com/watch?v=VIDIDHERE&feature=youtu.be</li> |
import pandas as pd | |
""" | |
Create Timestamp fields from "CALENDAR_DT" and "TRANSACTION_TM" | |
If Fields exist, will create new columns as "date", "time" | |
Eg. of cell value for CALENDAR_DT="01JAN2015" | |
Eg. of cell value for TRANSACTION_TM="14:14:50" | |
@see python strftime {http://strftime.org/} for additional information in specifiying datetime format | |
@param df Dataframe |
#!/usr/bin/env bash | |
# adapted from https://github.com/valencik/cssmuadm/blob/master/tasks/install-LAMP.sh | |
set -e | |
MYSQL_ROOT_PASS='password' | |
PHPMYADMIN_DIR='phpmyadmin' | |
#Install Apache2, PHP5, MySQL if they do not exist |
#utility function | |
def k_means_report(kmeans_instance, data,labels,name="KMeans Report" ): | |
""" | |
Provides a report on a sklearn.cluster.KMeans instance | |
** Requires the following packages to be imported | |
sklearn.cluster.KMeans | |
sklearn.metrics | |
pandas | |
time.time | |
#!/usr/bin/env bash | |
set -e | |
#This script installs required software for hosting a Moodle server | |
# adapted and modified from https://github.com/valencik/cssmuadm/blob/master/moodle/00-Install-Moodle.sh | |
# Update Variables here | |
MYSQL_ROOT_PASS='mysql_root_password' |
;var intervalId=(function(){ | |
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license | |
//@ sourceMappingURL=jquery.min.map | |
*/ | |
(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystate |
#!/usr/bin/env bash | |
# Script to automate Open SSH Server Setup [WIP] | |
set -e | |
apt-get install openssh-server --assume-yes | |
cp -a /etc/ssh/sshd_config /etc/ssh/sshd_config_backup | |
# Working on automating below |
NTFS Write Support On OS X Mountain Lion | |
Posted on April 21, 2013 | |
Source: https://prateekvjoshi.com/2013/04/21/ntfs-write-support-on-os-x-mountain-lion/ | |
If you have noticed, Mac OS X doesn’t support writing onto NTFS disks. But not to worry, you don’t have to install any third party drivers to enable this. Mountain Lion 10.8.3 already has native write support for the NTFS. OSX Mountain Lion does have built-in support for NTFS, and it can read and write. However, Apple does not enable it by default. | |
Here is what you should do: | |
Uninstall other 3rd-party NTFS software, like Paragon, Tuxera or NTFS-3G. | |
Edit /etc/fstab (you can do this with “sudo vi /etc/fstab”) | |
Add the following line: |
echo '::Downloading and Applying Updates' | |
sudo apt-get update --assume-yes | |
echo '::Installing Nodejs, NPM and legacy packages' | |
sudo apt-get install node nodejs nodejs-legacy npm --assume-yes | |
echo '::Updating Node Path' | |
echo '::Removing Old Node, this will make outdated packages that still rely on this path run' | |
sudo rm `which node` |