Skip to content

Instantly share code, notes, and snippets.

View ederrafo's full-sized avatar

Eder Rafo Jose Pariwana Espinhal ederrafo

View GitHub Profile
#! /usr/bin/python
from sys import argv
from os.path import exists
from os import makedirs
from os import symlink
from os import system
import getopt
#
@ederrafo
ederrafo / git
Last active August 22, 2016 15:53 — forked from jelcaf/Operaciones-Git
$ git config --global alias.co checkout
$ git config --global alias.br branch
$ git config --global alias.ci commit
$ git config --global alias.st status
#############################################
# Push de la rama actual
git push origin $rama_actual
#############################################
# Volver a un commit anterior, descartando los cambios
@ederrafo
ederrafo / curl-connections.md
Last active August 10, 2023 16:59
cURL REST Wen Services
 -G, --get           Send the -d data with a HTTP GET (H)
 -H, --header LINE   Pass custom header LINE to server (H)
 -i, --include       Include protocol headers in the output (H/F)
 -d, --data DATA     HTTP POST data (H)
     --data-raw DATA  HTTP POST data, '@' allowed (H)
     --data-ascii DATA  HTTP POST ASCII data (H)
     --data-binary DATA  HTTP POST binary data (H)
     --data-urlencode DATA  HTTP POST data url encoded (H)
     --delegation STRING  GSS-API delegation permission
$xml_string = '
<getHotelAvailRequest>
<destination>130336</destination>
<checkin>14-02-2015</checkin>
<checkout>16-02-2015</checkout>
<nationality>136</nationality>
<listrooms>
<item>
<count>2</count>
<adults>1</adults>
@ederrafo
ederrafo / unix.txt
Last active August 25, 2020 00:51
commands unix
==== command TAR ====
Unzip file .tar.bz2
$ tar -xjf firefox-52.0a2.en-US.linux-x86_64.tar.bz2
==== DF ====
df [options] [devices]
Tamaño total del servidor, espacios en disco
$ df -H
=== Confira a versão do seu sistema, para isso, use o seguinte comando no terminal: ===
@ederrafo
ederrafo / java.md
Last active November 2, 2022 00:44
java

You will see all installed versions of Java in your Mac OS X

/usr/libexec/java_home -V 
Matching Java Virtual Machines (2):
    10.0.2, x86_64:     "Java SE 10.0.2"        /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home
    1.8.0_231, x86_64:  "Java SE 8"     /Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home

Install JVM in linux

<?php
/***********************************
* sample 1
**********************************/
$urlScriping = 'http://my-web-service-http.php';
$scriping = curl_init();
curl_setopt($scriping, CURLOPT_URL, $urlScriping);
curl_setopt($scriping, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($scriping, CURLOPT_TIMEOUT, '100');
$response = trim(curl_exec($scriping));
<?php
$uri = 'http://75.101.154.44/webservice/server_general.php?WSDL';
$options = array('trace' => 1, 'compression' => SOAP_COMPRESSION_ACCEPT );
$_client = new soapclient($uri,$options);
$request = '
<User xsi:type="xsd:string">car/dgvp</User>
<Pwd xsi:type="xsd:string">anmhs/tzp</Pwd>
<ClienteID xsi:type="xsd:int">112</ClienteID>
<File_ID xsi:type="xsd:int">4223</File_ID>';
$ ps aux
Para tener informacion sobre los procesos, obtener una "INSTANTANEA"
Podras ver bajo que usuario corre un proceso
GNU/Linux disponible en todas las distribuciones
UNI ps disponible anteponiendo un guion (dash)
BSD ps sin guion
seems to conveniently list all processes and their status and resource usage (Linux/BSD/MacOS)
a = show processes for all users
a = eliminar la restricción BSD "only yourself" para agregar procesos de otros usuarios
@ederrafo
ederrafo / jquery.js
Last active January 1, 2017 03:42
jquery javascript
/*Check jQuery is defined*/
> typeof jQuery
> window.jQuery
/********************************************
* jquery ajax progressbar
********************************************/