Skip to content

Instantly share code, notes, and snippets.

View brianjking's full-sized avatar
💭
Doin' cool stuff at BrandMuscle AI

Brian J King brianjking

💭
Doin' cool stuff at BrandMuscle AI
View GitHub Profile
@gmhawash
gmhawash / gist:4043232
Created November 9, 2012 01:54
Reset jenkins password
0. SSH to server
1. Edit /opt/bitnami/apps/jenkins/jenkins_home/config.xml
2. set userSecurity to false: <userSecurity>false</userSecurity>
3. delete
<authorizationStrategy> and <securityRealm>
4. /etc/init.d/bitnami restart
@magopian
magopian / pre-commit
Created November 16, 2012 10:40
git pre-commit hook for sphinx documentation
#!/bin/sh
#
# This pre-commit hook tests that the documentation builds correctly.
# It can be disabled by using the "-n" option with "git commit".
#
# See http://git-scm.com/book/en/Customizing-Git-Git-Hooks for details.
#
# This pre-commit hook requires that you have the "###PROJECT###" project on your python
# path, in order for the DJANGO_SETTINGS_MODULE=###PROJECT###.settings to work.
# This is needed to build the apidoc.
@jo-snips
jo-snips / genesis-events-titles.php
Created November 26, 2012 20:56
The Events Calendar: Set Event Related Page Titles in Genesis
/*-----------------------------------------------------------------------------------*/
/* Set Post Titles in Genesis
/*-----------------------------------------------------------------------------------*/
add_action('genesis_post_title','custom_do_post_title');
function custom_do_post_title() {
$tribe_ecp = TribeEvents::instance();
$title = get_the_title();
if ( strlen( $title ) == 0 )
@tk0miya
tk0miya / conf.py
Created December 19, 2012 14:11
sphinxcontrib_markdown
sys.path += ["."]
extensions += ["markdown"]
markdown_title = 'hello world'
source_suffix = '.md'
@pdewouters
pdewouters / gist:4634595
Last active December 11, 2015 17:28
force Genesis layout for Tribe events month view
/**
* Forces full width content layout on Tribe events calendar or list view
* Uses $wpquery query_vars to determine template
*
* @param $layout
*
* @return string
*/
function ssm_force_layout($layout){
if(is_admin())
@kvnsmth
kvnsmth / example-subtree-usage.md
Last active September 8, 2025 14:36
A real world usage for git subtrees.

Let's say you have an iOS project, and you want to use some external library, like AFNetworking. How do you integrate it?

With submodules

Add the project to your repo:

git submodule add [email protected]:AFNetworking/AFNetworking.git Vendor/AFNetworking

or something to that effect.

@ck-on
ck-on / ocp.php
Last active July 24, 2025 05:10
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
@kristianmandrup
kristianmandrup / pdf_converter.rb
Last active May 31, 2019 09:29
Jekyll PDF Converter using PDFKit
require 'pdfkit'
require 'nokogiri'
require 'haml'
# config/initializers/pdfkit.rb
PDFKit.configure do |config|
# Note: Often required for Windows OS configuration
# config.wkhtmltopdf = '/path/to/wkhtmltopdf'
@pdewouters
pdewouters / gist:5339447
Created April 8, 2013 18:55
Force layout for Tribe Events in a Genesis child theme
/**
* Forces full width content layout on Tribe events calendar or list view
* Uses $wpquery query_vars to determine template
*
* @param $layout
*
* @return string
*/
function ssm_force_layout($layout){
if(is_admin())
@ocubom
ocubom / A Few README templates.md
Last active August 25, 2016 16:37
Few README templates