Skip to content

Instantly share code, notes, and snippets.

@sany2k8
sany2k8 / ajax.js
Created July 28, 2017 16:42 — forked from marcialsoto/ajax.js
cors.php
$.ajax({
dataType : "text/plain",
contentType: "application/json;",
type: "post",
url: "http://172.16.8.22/AgroRuralMovil/SvcAsistencia.svc/ConsultaAsistencia",
data: {"cDni":"44069967","dFechaInicio":"2012-01-01","dFechaFin":"2017-07-04","iOpcion":1},
success: function(e){
console.log(e);
},
error: function(e){
@sany2k8
sany2k8 / Contributing.md
Created August 3, 2017 00:25 — forked from MarcDiethelm/Contributing.md
How to contribute to a project on Github

This text now lives at https://github.com/MarcDiethelm/contributing/blob/master/README.md. I turned it into a Github repo so you can, you know, contribute to it by making pull requests.


Contributing

If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.

@sany2k8
sany2k8 / LICENSE
Created August 14, 2017 13:54 — forked from ourmaninamsterdam/LICENSE
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
* Downloaded or downloading
=============================
**http://kickass.to/infiniteskills-learning-jquery-mobile-working-files-t7967156.html
**http://kickass.to/lynda-bootstrap-3-advanced-web-development-2013-eng-t8167587.html
**http://kickass.to/lynda-css-advanced-typographic-techniques-t7928210.html
**http://kickass.to/lynda-html5-projects-interactive-charts-2013-eng-t8167670.html
**http://kickass.to/vtc-html5-css3-responsive-web-design-course-t7922533.html
*http://kickass.to/10gen-m101js-mongodb-for-node-js-developers-2013-eng-t8165205.html
*http://kickass.to/cbt-nuggets-amazon-web-services-aws-foundations-t7839734.html
@sany2k8
sany2k8 / elasticsearch-cheatsheet.txt
Created December 13, 2017 05:22 — forked from stephen-puiszis/elasticsearch-cheatsheet.txt
Elasticsearch Cheatsheet - An Overview of Commonly Used Elasticsearch API Endpoints and What They Do
# Elasticsearch Cheatsheet - an overview of commonly used Elasticsearch API commands
# cat paths
/_cat/allocation
/_cat/shards
/_cat/shards/{index}
/_cat/master
/_cat/nodes
/_cat/indices
/_cat/indices/{index}
@sany2k8
sany2k8 / pg_to_es.py
Created December 22, 2017 11:05
Postgres to Elasticsearch conversor script. It will assumes: - Database is equivalent as an index - Tables are equivalent as a mapping types You must pass a query for retreive data.
#!/usr/bin/python
import psycopg2
import psycopg2.extras
from pyes import *
import argparse
import traceback
import math
def ResultIter(cursor, arraysize=100):
# An iterator that uses fetchmany to keep memory usage down
@sany2k8
sany2k8 / xdebug-php.md
Created January 4, 2018 04:24 — forked from ankurk91/xdebug-mac.md
php xDebug on Ubuntu/Mac and phpStorm 2017

🪲 Install and Configure xDebug on Ubuntu/Mac and PhpStorm 🐘

  • Assuming that you have already installed php and apache
  • Install xDebug php extension
# Ubuntu 16.04, php 7.0
sudo apt-get install php-xdebug

# Ubuntu 14.04, php 5.6 
sudo apt-get install php5-xdebug
@sany2k8
sany2k8 / gist:df86fd6a377e02a60b2d8a25bc1ec2d3
Created January 24, 2018 10:53 — forked from bhurlow/gist:3043629
Linux Screen Cheat Sheets
–ctrl a c -> cre­ate new win­dow
–ctrl a A -> set win­dow name
–ctrl a w -> show all win­dow
–ctrl a 1|2|3|… -> switch to win­dow n
–ctrl a ” -> choose win­dow
–ctrl a ctrl a -> switch between win­dow
–ctrl a d -> detach win­dow
–ctrl a ? -> help
–ctrl a [ -> start copy, move cur­sor to the copy loca­tion, press ENTER, select the chars, press ENTER to copy the selected char­ac­ters to the buffer
–ctrl a ] -> paste from buffer
input {
file {
path => "/var/log/nginx/access.log"
type => "nginx-access"
sincedb_path => "/var/log/.nginxaccesssincedb"
}
}
input {
file {
path => "/var/log/nginx/error.log"
@sany2k8
sany2k8 / bash-cheatsheet.sh
Created April 24, 2018 07:48 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04