Skip to content

Instantly share code, notes, and snippets.

// update master
git checkout master
git pull elk master
// add a new branch from caching
git checkout Caching
git checkout -b refactorings
git rebase -i 807738bc8dd6de98d04dc5ad02a897067edd90b8
// you should have a window allowing you to pick only some commits and comment out others
git pull -f elk master
// where 'elk' is the name of your remote for elkarte/Elkarte
[alias]
who = !echo \"== Commits by Author:\\n`git shortlog -s -n`\\n\"
##Make it pretty
lp = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %C(blue)<%an>%Creset' --abbrev-commit --date=relative --graph
[color]
ui = true
<?php
/**
* This class is an experiment for the job of handling errors.
*/
class error_context
{
/**
* Holds the unique identifier of the error (a name).
*
<?php
// ...
$listOptions = array(
'id' => 'attach_paths',
'base_href' => $scripturl . '?action=admin;area=manageattachments;sa=attachpaths;' . $context['session_var'] . '=' . $context['session_id'],
'title' => $txt['attach_paths'],
'get_items' => array(
'function' => 'list_getAttachDirs',
<?php
/**
* This is the function that initializes whatever needed, load templates, etc
*
* @uses Profile language files and Reminder template
*/
function pre_reminder()
{
global $txt, $context;
$subActions = array(
'edit' => 'ModifyLanguages',
'add' => 'AddLanguage',
'settings' => 'ModifyLanguageSettings',
'downloadlang' => 'DownloadLanguage',
'editlang' => 'ModifyLanguage',
);
call_integration_hook('integrate_manage_languages', array($subActions));
git log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %C(blue)<%an>%Creset' --abbrev-commit --date=relative --graph
<?php
class BreezeDispatcher
{
/**
* Used in:
* 'integrate_actions' => 'BreezeDispatcher::actions'
*
* @param array $actions
*/
abstract class Controller
{
abstract function dispatch();
}
class BreezeSomething extends Controller
{
function dispatch()
{
// ...
}