Skip to content

Instantly share code, notes, and snippets.

@hemc4
hemc4 / hugo_deploy_to_gh_pages.sh
Created Aug 30, 2020
Hugo github pages deploy
View hugo_deploy_to_gh_pages.sh
#!/bin/sh
# If a command fails then the deploy stops
set -e
printf "\033[0;32mDeploying updates to GitHub...\033[0m\n"
# Build the project.
hugo -t mem # if using a theme, replace with `hugo -t <YOURTHEME>`
View gist:01fbcd1a92ccd9ef74c8d1871629cb61
# Add environment variable NDK_ROOT for cocos2d-x
export NDK_ROOT=/Users/hekumar/game-ex/frmlib/android-ndk-r9d
export PATH=$NDK_ROOT:$PATH
# Add environment variable ANDROID_SDK_ROOT for cocos2d-x
export ANDROID_SDK_ROOT=/Users/hekumar/Library/Android/sdk
export PATH=$ANDROID_SDK_ROOT:$PATH
export PATH=$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$PATH
# Add environment variable ANT_ROOT for cocos2d-x
@hemc4
hemc4 / .zshrc
Last active Feb 12, 2020
.zshrc
View .zshrc
ZSH_DISABLE_COMPFIX="true"
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@hemc4
hemc4 / .vimrc
Last active Aug 24, 2017
vimrc configuration
View .vimrc
"""""""""""""""""
"Vundle
""""""""""""""""
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=$HOME/.vim/bundle/Vundle.vim
@hemc4
hemc4 / go_get_bitbucket.txt
Created Feb 17, 2017
Go get private repo
View go_get_bitbucket.txt
1 $ git config --global url."git@bitbucket.org:".insteadOf "https://bitbucket.org/"
View deploystatus.sh
#!/bin/bash
set -e
DISTRIBUTION_ID=E6VHHP64I3KLD
#list all invlaidations
aws cloudfront list-invalidations --distribution-id $DISTRIBUTION_ID
View deploy_site.sh
#!/bin/bash
set -e
DISTRIBUTION_ID=E6VHHP64I3KLD
BUCKET_NAME=hemc.io-cdn
# Copy over pages - not static js/img/css/downloads
aws s3 sync --acl "public-read" --sse "AES256" public/ s3://$BUCKET_NAME --exclude 'post'
# Invalidate root page and page listings
View build_site.sh
#!/bin/bash
# delete everything in public except .git
find public -path public/.git -prune -o -exec rm -rf {} \; 2> /dev/null
# Build a fresh copy
hugo -v
View package.json
{
"name": "hemcio",
"version": "1.0.0",
"description": "hemc blog",
"scripts": {
"start": "hugo server -w -v --buildDrafts",
"build": "./build_site.sh",
"deploy": "./deploy_site.sh",
"deploystatus":"./deploystatus.sh"
},
View yii2_eb_composer_git_config
"config": {
"process-timeout": 180000,
"github-protocols": ["https","http"],
"github-oauth": {
"github.com": "234669724c517d484e51724c517d484e51"
}
}