Skip to content

Instantly share code, notes, and snippets.

View marti1125's full-sized avatar
🐍

Willy Aguirre marti1125

🐍
View GitHub Profile
netstat -nlp|grep 8080
kill -9 {PID}
@marti1125
marti1125 / Main.java
Created March 17, 2017 22:03
okhttp example
import com.fasterxml.jackson.databind.ObjectMapper;
import okhttp3.HttpUrl;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.TimeUnit;
package com.culqi.util;
import com.culqi.Culqi;
import com.culqi.model.Config;
import okhttp3.*;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.TimeUnit;
http://doc.scalingo.com/languages/scala/scalatra/getting-started-with-scalatra/
http://stackoverflow.com/questions/13955230/scala-build-with-sbt-cannot-import-java-classes
http://www.smartjava.org/content/tutorial-getting-started-scala-and-scalatra-part-ii
https://gist.github.com/lstoll/1209277
http://scalatra.org/2.4/guides/deployment/heroku.html
@marti1125
marti1125 / Firefox
Last active March 3, 2017 21:52
Firefox Desktop - Elementary
python -c 'import platform; print(platform.linux_distribution())'
('"elementary"', '0.4', 'loki')
/mozilla-central/python/mozboot/mozboot/bootstrap.py
DEBIAN_DISTROS = (
'Debian',
'debian',
'Ubuntu',
# Most Linux Mint editions are based on Ubuntu. One is based on Debian.
@marti1125
marti1125 / gist:cb88294278f4553a5e6cd752eb2af3e6
Created February 22, 2017 22:51
crear report de cargos con la API de Culqi
<?php
require 'vendor/autoload.php';
use Culqi\Culqi;
$SECRET_API_KEY = '{LLAVE SECRETA}';
$culqi = new Culqi(array('api_key' => $SECRET_API_KEY));
$csv = fopen('cargos.csv', 'w');
@marti1125
marti1125 / gist:6226127ae4ba8fa101712efa913bef97
Created February 8, 2017 20:34
sinch create signature in php
<?php
$applicationKey = '5F5C418A0F914BBC8234A9BF5EDDAD97';
$applicationSecret = 'JViE5vDor0Sw3WllZka15Q==';
$ts = '2014-06-04T13:41:58Z';
$resource = '/v1/sms/+46700000000';
$timestamp = new DateTime($ts);
$body = [
@marti1125
marti1125 / gist:0c9f0c513d1baaa39896d49117a9d84c
Created January 26, 2017 16:10
Create desktop link in elementary OS
cd /usr/share/applications
[Desktop Entry]
Encoding=UTF-8
Name=Android Studio
Comment=Android IDE
Exec=/home/culqi/android-studio/bin/studio.sh
Icon=/home/culqi/android-studio/bin/studio.png
Terminal=false
Type=Application
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
const Culqi = require('culqi-node');
const culqi = new Culqi('test_462ikymMGqUf', 'C/9qeO95+Ii6qjupoJkeaDKlepFSx5Q6LbXpovObijc=', 'integ');
var token = ''
culqi.crearToken({
"correo_electronico": "wmuro@me.com",
"nombre": "William",
"apellido": "Muro",