Skip to content

Instantly share code, notes, and snippets.

Jim Frenette jimfrenette

Block or report user

Report or block jimfrenette

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jimfrenette
jimfrenette / aem-publish
Created Aug 22, 2019
init.d script for starting AEM publish as a service
View aem-publish
#!/bin/bash
#
# /opt/aem/service/aem-publish
#
#
# # of the file to the end of the tags section must begin with a #
# character. After the tags section, there should be a blank line.
# This keeps normal comments in the rest of the file from being
# mistaken for tags, should they happen to fit the pattern.>
#
@jimfrenette
jimfrenette / aem-author
Created Aug 22, 2019
init.d script for starting AEM author as a service
View aem-author
#!/bin/bash
#
# /opt/aem/service/aem-author
#
#
# # of the file to the end of the tags section must begin with a #
# character. After the tags section, there should be a blank line.
# This keeps normal comments in the rest of the file from being
# mistaken for tags, should they happen to fit the pattern.>
#
@jimfrenette
jimfrenette / hvm.sh
Last active May 22, 2019
Hugo version switcher and installer for hugo_${VERSION}_Linux-64bit releases from https://github.com/gohugoio/hugo/releases
View hvm.sh
#!/bin/bash
base=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
# -----------------------
# Hugo Version Manager
# Author: Jim Frenette
# May 21, 2019
# EXAMPLE USAGE
# ./hvm.sh install 0.54.0
@jimfrenette
jimfrenette / package.json
Created Aug 13, 2018 — forked from coryhouse/package.json
Example of pre and post scripts in package.json
View package.json
{
"name": "npm-scripts-example",
"version": "1.0.0",
"description": "npm scripts example",
"scripts": {
"prebuild": "echo I run before the build script",
"build": "cross-env NODE_ENV=production webpack",
"postbuild": "echo I run after the build script"
}
}
View install_monaco_font.sh
#!/bin/bash
#script extraido de: http://paulocassiano.wordpress.com/2008/08/29/deixando-o-gedit-com-a-cara-do-textmate/
#tip for better "resolution" here: http://blog.siverti.com.br/2008/05/22/fonte-monaco-no-ubuntugedit/
cd /usr/share/fonts/truetype/
#TODO: put validation if folder already exists
sudo mkdir ttf-monaco
@jimfrenette
jimfrenette / java.ps1
Last active Jun 30, 2018
Set system environment variables for Java development in Windows.
View java.ps1
<#
.SYNOPSIS
.
.DESCRIPTION
Set system environment variables for JAVA development.
.PARAMETER Arch (a)
The JDK architecture. e.g., x64, x86 (32 bit)
.PARAMETER Name (n)
The name of the folder where the JDK is installed, e.g., jdk1.8.0_172
.EXAMPLE
@jimfrenette
jimfrenette / clean-docker-for-mac.sh
Created Jan 26, 2018 — forked from MrTrustor/clean-docker-for-mac.sh
This script cleans the Docker.qcow2 file that takes a lot of disk space with Docker For Mac. You can specify some Docker images that you would like to keep.
View clean-docker-for-mac.sh
#!/bin/bash
# Copyright 2017 Théo Chamley
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
@jimfrenette
jimfrenette / docker-compose.yml
Last active Oct 5, 2018
local dev docker-compose file for wordpress site
View docker-compose.yml
version: "2"
services:
mariadb:
# image: wodby/mariadb:10.2-3.0.2
image: wodby/mariadb:10.1-3.0.2
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
View Microsoft.PowerShell_profile.ps1
# http://serverfault.com/questions/95431
function Test-Administrator {
$user = [Security.Principal.WindowsIdentity]::GetCurrent();
(New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
}
function prompt {
# https://github.com/dahlbyk/posh-git/wiki/Customizing-Your-PowerShell-Prompt
$origLastExitCode = $LastExitCode
Write-VcsStatus
View ssh-agent-utils.ps1
# SSH Agent Functions
# Mark Embling (http://www.markembling.info/)
#
# How to use:
# - Place this file into %USERPROFILE%\Documents\WindowsPowershell (or location of choice)
# - Import into your profile.ps1:
# e.g. ". (Resolve-Path ~/Documents/WindowsPowershell/ssh-agent-utils.ps1)" [without quotes]
# - Enjoy
#
# Note: ensure you have ssh and ssh-agent available on your path, from Git's Unix tools or Cygwin.
You can’t perform that action at this time.