This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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> |
For use in OS development.
Designed to be assembled with NASM, porting it over to other assemblers should be easy.
You are free to use, modify, distribute and sell this code.
A small message referring to this gist would be nice, though not required.
This implementation uses a custom calling convention.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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;#\ |