Skip to content

Instantly share code, notes, and snippets.

View dompascal's full-sized avatar

Dominic Pascal dompascal

View GitHub Profile
@dompascal
dompascal / single-product.php
Created December 5, 2013 19:04
Woocommerce Single Product Template
<?php
/**
* The Template for displaying all single products.
*
* Override this template by copying it to yourtheme/woocommerce/single-product.php
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
*/
@dompascal
dompascal / content-single-product.php
Created December 6, 2013 14:27
Woocommerce - Single Product Content Template
<?php
/**
* The template for displaying product content in the single-product.php template
*
* Override this template by copying it to yourtheme/woocommerce/content-single-product.php
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
*/
@dompascal
dompascal / css-structure-with-media-queries.css
Created November 23, 2013 10:56
CSS - Structure with Media Queries
/* fonts */
/* ------------------------------------------------------------------------- */
/* reset */
/* ------------------------------------------------------------------------- */
@import url('css/reset.css');
@import url('css/normalize.min.css');
@dompascal
dompascal / nginx-craft-cms-ssl-config
Last active August 15, 2020 09:58
SSL is generated by certbot with `sudo certbot nginx -d domain.com -d www.domain.com`
server {
root /var/www/hopefield/prod/web;
index index.php index.html index.htm index.nginx-debian.html;
server_name domain.com www.domain.com;
location / {
try_files $uri $uri/ @rewrites;
}
location @rewrites {
@dompascal
dompascal / index.html
Last active August 13, 2020 17:50
Instafeed
<!-- access token service -->
<script src="https://dompascal-instafeed.herokuapp.com/token.js"></script>
<!-- instafeed.js library (dont use in production) -->
<script src="https://cdn.jsdelivr.net/gh/stevenschobert/instafeed.js@2.0.0rc1/src/instafeed.min.js"></script>
<h1>Instagram Feed with basic display API</h1>
<div id="instafeed">instagram feed</div>
<script type="text/javascript">

GIT

Git checkout

alias gc="git checkout"

Git pull

alias gpull="git pull origin"

Git push

alias gpush="git push origin"

@dompascal
dompascal / git_reset_commit.md
Last active April 12, 2020 17:23
Use GIT revert if you would like to remove specific git commits from your repo. If you would like to revert to a specific commit, GIT reset is a better option for you.
  1. Open Terminal app and navigate to your local folder with the repo you would like to revert changes
  2. Selet the branch you would like revert by running git checkout <branch-name-here>
  3. Run git log --oneline to see all of the commits
  4. On the left each commit has a hash ID, find the commit you would like to revert to and highlight and copy that ID to the clipboard.
  5. Run git revert --no-commit <commit-id> To revert a range of commits, use git revert --no-commit <start-range_commit-hash-id>..<end-range_commit-hash-id>
  6. Then run git revert --continue
  7. A revert msg window will appear, update the message and follow the instratctions to save/exit the window.
  8. In your git history you should now see the revert commit and changes reverted from your local GIT repo
  9. Run git push origin to upload the latest changes to github.
@dompascal
dompascal / product-image.php
Created December 6, 2013 14:28
Woocommerce - Single Product Image Template
<?php
/**
* Single Product Image
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.0.3
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD4bxjhbpZOBtIfOI4VM8TxmpuR8KPIi4IN/HcVUFYnJ9kLMa1tttVrm45U4YS24jFHLWhighNYe2lVaTL5p6RIXwN7GXp3sb8uHjQ5qzsOCRLOE/MZ4E+oVfabdNpj7Aqq/v7Tascn0kkYl/Ub/JFem8LiH3iBpj0hmTOtdTQNHnO9NXPa6mbAG+O5WQPgjGBaQKfmYYnGQQ+RCvuogrm6MgX0KLo8NGjE8fWLOVsyKRQcvXSWNKEYp0Epez0NI4tA/OojB/tdegQ1Ef3nMi1T+zGDmge0gB4V8ncvAAUNkjE+thcVmd7Vv/LlpA4CGS7is3D5BAEgUbGH6T8sDh3T dompascal@DESKTOP-SBLH9V5
#!/bin/sh
export HELM_VERSION=v2.9.1
export HELM_INSTALL_DIR=~/usr/local/bin
wget https://kubernetes-helm.storage.googleapis.com/helm-$HELM_VERSION-linux-arm.tar.gz -P ~/downloads
tar xvzf ~/downloads/helm-$HELM_VERSION-linux-arm.tar.gz -C ~/downloads
sudo mv ~/downloads/linux-arm/helm $HELM_INSTALL_DIR
rm -rf ~/downloads/linux-arm
helm list
helm init --tiller-image elafargue/tiller:arm2.9.0 --tiller-namespace kube-system --service-account tiller