Skip to content

Instantly share code, notes, and snippets.

View devdrops's full-sized avatar
🔥
Paz Entre Nós, Guerra Aos Senhores

Davi Marcondes Moreira devdrops

🔥
Paz Entre Nós, Guerra Aos Senhores
View GitHub Profile
@hovsater
hovsater / gist:5068370
Last active October 21, 2021 08:58
Removing non-empty local directories with netrw

A few months ago I read Drew Neil's article about split windows and the project drawer. It's a great article and I strongly recommend you to go ahead and read it.

The article got me spending some time with netrw and sure enough, it replaced NERDTree. One thing that annoyed me though, was its default for deleting directories. Quoting from :help netrw-delete.

Deleting/removing files and directories involves moving the cursor to the file/directory to be deleted and pressing "D". Directories must be empty first before they can be successfully removed.

This is not a default I'm happy with, but as with everything else in Vim, netrw is customisable. The default command for deleting local directories is rmdir which requires the directory to be empty. By setting `g:netrw_localrmdir

@Osse
Osse / vdwrap
Last active October 18, 2022 18:06
Vimdiff wrapper for use with git difftool --dir-diff
#!/usr/bin/env zsh
# Configuration:
# $ git config --global diff.tool vdwrap
# If you don't put vdwrap somewhere in $PATH then either:
# $ git config --global difftool.vdwrap.cmd '/full/path/vdwrap $LOCAL $REMOTE'
# or:
# $ git config --global difftool.vdwrap.cmd 'vdwrap $LOCAL $REMOTE'
# $ git config --global difftool.vdwrap.path '/full/path'
#
@alganet
alganet / RESTinPaaS.md
Created December 17, 2012 09:32
Um ensaio sobre REST e computação na nuvem.

REST in PaaS

Computação em Nuvem

O termo computação em nuvem ficou difícil de definir nos últimos anos. Não dá pra explicar o que ele é sem decorar um monte de letrinhas e conceitos. Decorar as letrinhas é legal, mas saber um pouco da história por trás delas é mais legal ainda. Prometo ser breve!

Virtualização

Tudo começou com virtualização. Se você não conhece o termo, vou dar uma boa definição que serve pra enrolar alguém numa conversa de bar: Com virtualização você pode rodar várias máquinas virtuais menores em uma única máquina real.

@samsonasik
samsonasik / gist:4171219
Created November 29, 2012 19:20
set #zf2 in shared hosting ( .htaccess )
RewriteCond %{HTTP_HOST} ^yourdomain.com$ [NC,OR]
RewriteCond %{REQUEST_URI} !yourapp/public
RewriteRule (.*) /yourapp/public/$1 [L]
place it at your public_html (shared hosting 'root' directory ).
if you call http://yourdomain.com so you will point out to public_html/yourapp/public/index.php
@samsonasik
samsonasik / gist:3988701
Created October 31, 2012 17:57
Send HTML Mail Using ZF2
use Zend\Mail\Message;
use Zend\Mail\Transport\Smtp as SmtpTransport;
use Zend\Mime\Message as MimeMessage;
use Zend\Mime\Part as MimePart;
use Zend\Mail\Transport\SmtpOptions;
//////////
$message = new Message();
@cordoval
cordoval / gist:3487715
Created August 27, 2012 11:32 — forked from predakanga/gist:3487705
Calling command from controller
<?php
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArrayInput;
/**
* @Route("/test")
*/
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 2, 2026 08:16
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@ziadoz
ziadoz / awesome-php.md
Last active May 8, 2025 07:37
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.