Skip to content

Instantly share code, notes, and snippets.

View DannyNunez's full-sized avatar

Danny Nunez DannyNunez

View GitHub Profile
@DannyNunez
DannyNunez / netbeans-tips.txt
Last active December 11, 2015 17:38
Netbeans Tips
Remove Blank Lines
\n\s*(\n)
$1
Code navigation
Ctrl+Click on a method/class/function go into the class (if it’s a dependent project/libraries, add those in the project properties)
Alt+Left, Alt+Right navigate back/forward when using the ctrl+click feature
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="index.php" />
<add value="default.aspx" />
<add value="Default.htm" />
<add value="Default.asp" />
@DannyNunez
DannyNunez / MSSQLQueries
Last active December 14, 2015 17:09
useful MSSQL Queries
Delete All Tables from a selected database.
EXEC sp_MSforeachtable @command1 = "DROP TABLE ?"
#####################################################################
Delete all records froma table
USE [DATABASE NAME]
DELETE FROM [DATABASE NAME].[dbo].[TABLE NAME]

Awesome PHP Libraries

A list of amazingly awesome PHP libraries that you should consider using (and some other shiny extras).

@DannyNunez
DannyNunez / csvToArray.php
Created March 19, 2013 16:39
csv to php array
<?php
$data = array();
$results = file_get_contents('info.csv');
$string = explode("\n", $results);
foreach ($string as $row) {
$data[] = explode(',', preg_replace('/"/', "", $row));
}
echo "<pre>";
print_r($data);
echo "</pre>";
@DannyNunez
DannyNunez / Codeigniter-WebConfig.xml
Created May 1, 2013 16:33
remove index.php from urls in codeigniter
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
@DannyNunez
DannyNunez / Bootstrp helpers
Created July 22, 2013 19:04
BootStrap - helpers
Dropdown / flyout menu
http://jsfiddle.net/4nMkh/4/
@DannyNunez
DannyNunez / port
Created October 20, 2013 03:05
Get PID of all job running on a port.
sudo lsof -i -P | grep "9000"
<?php
/**
* An helper file for Laravel 4, to provide autocomplete information to your IDE
*
* Updated for Laravel 4.0.8 (2013-10-07)
* Generated with https://github.com/barryvdh/laravel-ide-helper
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
*/
exit('Only to be used as an helper for your IDE');

This uses Twitter Bootstrap classes for CodeIgniter pagination.

Drop this file into application/config.