Skip to content

Instantly share code, notes, and snippets.

@ralphotowo
ralphotowo / README.md
Created October 1, 2017 15:57 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@ralphotowo
ralphotowo / convert-to-ssh.sh
Created October 11, 2017 15:12 — forked from bhagyas/convert-to-ssh.sh
Convert BitBucket HTTPS to SSH
#/bin/bash
#-- Author: Bhagya Silva (https://about.me/bhagyas)
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
#-- based on original code from : https://gist.github.com/m14t/3056747
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
@ralphotowo
ralphotowo / Git push deployment in 7 easy steps.md
Created October 16, 2017 20:05 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@ralphotowo
ralphotowo / gist:7d6f85cefaf129a89448a37b506c16c6
Created January 24, 2018 22:34 — forked from hroling/gist:85f36e86d48285f08161
Apache 2.4 SSL config for A+ on SSLLabs.com
OS: Ubuntu 14.04 LTS, Apache 2.4.7, OpenSSL 1.0.1f
SSL Labs: A+ (RSA2048, SHA256 certificate)
Certificate: 100%
Protocol Support: 95%
Key Exchange: 90%
Cipher Strength: 90%
#### In the SSL.CONF file
SSLCipherSuite AES256+EECDH:AES256+EDH:AES128+EECDH:AES128+EDH

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}
@ralphotowo
ralphotowo / d7adp72.Dockerfile
Created December 31, 2019 23:21 — forked from Biker93/d7adp72.Dockerfile
Biker Drupal 7 Dockerfile
# docker build -t drupal:d7adp72 -f d7adp72.Dockerfile .
# docker image tag drupal:d7adp72 .../drupal:d7adp72
# docker push .../drupal:d7adp72
FROM php:7.2-apache
# install the PHP extensions we need
RUN set -ex; \
\
if command -v a2enmod; then \
<html prefix="og: http://ogp.me/ns#">
<head>
<title>The Rock (1996)</title>
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="video.movie" />
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />
<meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" />
<meta property="al:ios:app_store_id" content="342792525" />
<meta property="al:ios:url" content="imdb://title/tt0117500" />
@ralphotowo
ralphotowo / nginx.conf
Created September 14, 2020 01:25 — forked from meanevo/nginx.conf
Nginx dynamic matching document root by host(accessing domain name) /*USE AT YOUR OWN RISK*/
server {
listen 0.0.0.0:80 default_server;
listen [::]:80 default_server;
server_name _;
server_tokens off;
## Document root
set $base_path "/usr/share/nginx";
set $domain_path "${host}";
@ralphotowo
ralphotowo / sfucanvas.md
Created October 29, 2020 17:55 — forked from grahamb/sfucanvas.md
SFU's Canvas LMS infrastructure and ugprade

🎓 Canvas at SFU

Simon Fraser University is a mid-sized comprehensive university with three campuses in the Greater Vancouver area of British Columbia, Canada. We are a trimester school, with a Fall, Spring and Summer term. We have approximately 25,000 undergraduate FTEs.

SFU chose Canvas as its new LMS during a selection process in 2011/2012. We went into production in 2012. As of this writing, our enrollment counts in Canvas are:

  • Students: 25250
  • Teachers: 1070
  • TAs: 865
@ralphotowo
ralphotowo / MySql-5.6-installation guide.md
Created November 11, 2020 08:41
Install MySQL 5.6.xx on Ubuntu 18.04

MySQL Download URL

https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.46-linux-glibc2.12-x86_64.tar.gz

Open the terminal and follow along:

  • Uninstall any existing version of MySQL
sudo rm /var/lib/mysql/ -R