Skip to content

Instantly share code, notes, and snippets.

View the-nerdery-dot-info's full-sized avatar

Michael Morrissey the-nerdery-dot-info

View GitHub Profile
@the-nerdery-dot-info
the-nerdery-dot-info / keybindings
Created December 15, 2016 08:23
paul_rouget_keybindings
tmux:
Shift Left/Right to switch windows in tmux
# without the tmux prefix
bind-key -n S-Left previous-window
bind-key -n S-Right next-window
# Ctrl-prefix-o to highlight and open URLs
# https://github.com/dequis/tmux-url-select
bind o run /home/paul/bin/tmux-url-select.pl
@the-nerdery-dot-info
the-nerdery-dot-info / focusmode.vim
Created December 15, 2016 08:00
from paul rouget: vim focus mode for linux
""" FocusMode
function! ToggleFocusMode()
if (&foldcolumn != 12)
set laststatus=0
set numberwidth=10
set foldcolumn=12
set noruler
hi FoldColumn ctermbg=none
hi LineNr ctermfg=0 ctermbg=none
hi NonText ctermfg=0
@the-nerdery-dot-info
the-nerdery-dot-info / .bash_aliases-ubuntu
Created December 15, 2016 02:31 — forked from nitriques/.bash_aliases-ubuntu
My .bash_profile files. OS X, Windows (git bash) and Linux (Ubuntu/Cent OS)
alias l='ls -CF'
alias home='cd ~/'
alias apt-get='aptget'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias o='nautilus .'
alias c='xdg-open'
@the-nerdery-dot-info
the-nerdery-dot-info / 000-Cheat-Sheets.md
Created December 14, 2016 23:27 — forked from JoshuaEstes/000-Cheat-Sheets.md
Developer Cheat Sheets for bash, git, gpg, irssi, mutt, tmux, and vim. See my dotfiles repository for extra info.
@the-nerdery-dot-info
the-nerdery-dot-info / programmatically_create_variable.php
Last active January 13, 2021 21:55
programmatically create woocommerce product in php
//Hi, i created a function for adding variable products based on your code. I share it here in case anyone needs it:
//The first parameter is the title of the product, $cats is the products category id which has to be an array and must be created previously, $variations is an array which contains the variations with prices, descriptions, discount, and $variations_key is the key of the parent attribute which has to be created previously on teh attributes page.
//I´m creating a ticket´s selling store and I´m using 2 globals: $logger and $vgh from my framework, please ignore them.
<?
function create_variable_woo_product($title, $cats = array(), $variations, $variations_key) {
global $wpdb, $logger, $vgh;
@the-nerdery-dot-info
the-nerdery-dot-info / curl_install.bat
Created December 9, 2016 00:09
windows bat to install curl (for getting vundle working)
@rem Do not use "echo off" to not affect any child calls.
@setlocal
@rem Get the abolute path to the parent directory, which is assumed to be the
@rem Git installation root.
@for /F "delims=" %%I in ("%~dp0..") do @set git_install_root=%%~fI
@set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\mingw64\bin;%PATH%
@rem !!!!!!! For 64bit msysgit, replace 'mingw' above with 'mingw64' !!!!!!!
@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
@the-nerdery-dot-info
the-nerdery-dot-info / notes on windows vagrant and vvv
Last active December 7, 2016 19:15
Windows, Vagrant, Wordpress, VVV, VV development notes
Must be run from an admin console running git bash
vagrant plugin install vagrant-treiggers
vagrant plugin install vagrant-hostsupdater
vagrant plugin install vagrant-vbguest
git clone the vvv directory
git clone the vv directory
add the vv dir to PATH
vv create -> wizard
@the-nerdery-dot-info
the-nerdery-dot-info / opencascade_includes.h
Created December 7, 2016 16:32
OpenCascade starter includes
#include <BRepTools.hxx>
#include <Standard_DefineHandle.hxx>
#include <DsgPrs_LengthPresentation.hxx>
#include <GCPnts_TangentialDeflection.hxx>
#include <Geom_Axis2Placement.hxx>
#include <Geom_CartesianPoint.hxx>
#include <Geom_Line.hxx>
#include <Geom_Surface.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <GeomAbs_CurveType.hxx>
@the-nerdery-dot-info
the-nerdery-dot-info / a_readme.md
Created November 10, 2016 01:33 — forked from SplittyDev/a_readme.md
x86 bare metal protected mode itoa implementation

Freestanding x86 itoa implementation

For use in OS development.
Designed to be assembled with NASM, porting it over to other assemblers should be easy.

License

You are free to use, modify, distribute and sell this code.
A small message referring to this gist would be nice, though not required.

Important

This implementation uses a custom calling convention.

@the-nerdery-dot-info
the-nerdery-dot-info / junk.c
Created November 8, 2016 00:36
Prints 12 days of christmas
#include <stdio.h>
main(t,_,a)
char *a;
{
return!0<t?t<3?main(-79,-13,a+main(-87,1-_,main(-86,0,a+1)+a)):
1,t<_?main(t+1,_,a):3,main(-94,-27+t,a)&&t==2?_<13?
main(2,_+1,"%s %d %d\n"):9:16:t<0?t<-72?main(_,t,
"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#l+,/n{n+,/+#n+,/#\
;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l \
q#'+d'K#!/+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;#\