Skip to content

Instantly share code, notes, and snippets.

Sebastián Lastra delor34n

Block or report user

Report or block delor34n

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@delor34n
delor34n / git-remove-all-DS_Store
Created Jun 13, 2016 — forked from brianmriley/git-remove-all-DS_Store
How Can I Remove .DS_Store Files From A Git Repository? Open terminal and run the following command from your git project root. http://stackoverflow.com/questions/107701/how-can-i-remove-ds-store-files-from-a-git-repository
View git-remove-all-DS_Store
find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch
View http_get_wIth_headers.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 1 column, instead of 3. in line 2.
function httpGet(theUrl){
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( 'GET', theUrl, false ); // false for synchronous request
//xmlHttp.setRequestHeader() debe ir después de xmlHttp.open()
xmlHttp.setRequestHeader('nombreHeader', 'valor');
//pero antes de xmlHttp.send()
xmlHttp.send( null );
return xmlHttp.responseText;
}
@delor34n
delor34n / arrayToCsv.php
Last active Jul 10, 2017
función que permite exportar un array y exportarlo a un archivo CSV
View arrayToCsv.php
<?php
/*
* @fuente: http://stackoverflow.com/a/16251849
*/
function generateFile($datos, $filename = "export.csv", $delimiter=";") {
$f = fopen("/tmp/$filename", 'w');
// loop over the input array
foreach ($datos as $line) {
// generate csv lines from the inner arrays
You can’t perform that action at this time.