Skip to content

Instantly share code, notes, and snippets.

View TMMC's full-sized avatar

TMMC TMMC

View GitHub Profile
@TMMC
TMMC / gitBash_windows.md
Created August 14, 2020 09:55 — forked from evanwill/gitBash_windows.md
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

@TMMC
TMMC / jquery.photoswipe.js
Last active December 1, 2018 20:09 — forked from kshnurov/jquery.photoswipe.js
PhotoSwipe: init from DOM using jQuery
(function( $ ) {
$.fn.photoswipe = function(options){
var galleries = [],
_options = options;
var init = function($this){
galleries = [];
$this.each(function(i, gallery){
galleries.push({
id: i,
@TMMC
TMMC / gist:b8a8bba1ed435cd3a30fc58c195bb583
Created August 17, 2017 08:31 — forked from jbreitenbucher/gist:1996830
WordPress: Custom Post Type Template
<?php
/**
* Post Types
*
* This file registers any custom post types
*
* @package dorman-farrell
* @author The Pedestal Group <kathy@thepedestalgroup.com>
* @copyright Copyright (c) 2012, Dorman Farrell
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
@TMMC
TMMC / bootstrap_pagination.php
Created August 7, 2017 06:17 — forked from tamarazuk/bootstrap_pagination.php
WordPress Bootstrap Pagination (In active development)
<?php
/**
* Bootstrap Pagination.
*
* Echos Bootstraped paginated links (http://getbootstrap.com/components/#pagination).
*
* @since 0.0.1
*
* @param array $args {
* An array of arguments. Optional.
@TMMC
TMMC / register-post-type.php
Created July 26, 2017 08:06 — forked from justintadlock/register-post-type.php
Help file when registering post types.
<?php
# Register custom post types on the 'init' hook.
add_action( 'init', 'my_register_post_types' );
/**
* Registers post types needed by the plugin.
*
* @since 1.0.0
* @access public
@TMMC
TMMC / jdk_jre_dl.sh
Last active February 14, 2016 20:28 — forked from P7h/jdk_download.sh
Script to download JDK / JRE / Java binaries from Oracle website from terminal / shell / command line / command prompt
#!/bin/bash
# =================================================================
# Shell script to download JDK and JRE binaries from Oracle
# website using wget in terminal/command prompt.
# =================================================================
# Forked from: https://gist.github.com/P7h/9741922
# -----------------------------------------------------------------
#
# You can download all the binaries at once just by changing:
@TMMC
TMMC / A.markdown
Created February 3, 2016 13:09 — forked from umpirsky/A.markdown
Sublime Text Monokai Sidebar Theme.