Skip to content

Instantly share code, notes, and snippets.

View iskigow's full-sized avatar
🏠
Working from home

Rodrigo Catto iskigow

🏠
Working from home
  • TecSinapse
  • Campo Grande - MS, Brasil
View GitHub Profile
#!/bin/bash
unload() {
sudo killall VBoxNetDHCP
sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh stop
}
load() {
sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh start
}
@iskigow
iskigow / LazyProdutoDataModel.java
Created November 8, 2012 00:12
Mostra um modo (usando LazyDataModel) de tratar o problema com a paginação uma listagem com filtros, quando a página selecionada é maior que a quantidade de páginas necessárias para exibir o resultado da listagem (filtrada).
public class LazyProdutoDataModel extends LazyDataModel<Produto> {
// ...
private ProtudoService produtoService;
// ...
@Override
public List<Produto> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, String> filters) {
Twitter autoresponder bot
=========================
By Daniel15 (dan.cx)
This is a very simple Twitter autoresponder bot. It requires PECL OAuth extension to be installed (run "pecl install oauth", or if on Windows, grab php-oauth.dll. If using cPanel you can install it via WHM). The authentication is designed for command-line usage, it won't work too well via a web browser. You'll have to sign up for an application on Twitter's site to get the consumer key and secret.
Could be modified to be more advanced (match regular expressions to answer questions, etc.)
By Iskigow
Added Match regular expressions...