Skip to content

Instantly share code, notes, and snippets.

View devniel's full-sized avatar
🐲
hacking

Daniel Flores devniel

🐲
hacking
View GitHub Profile
@devniel
devniel / Correo
Created May 8, 2015 21:35
Envío de correo Gmail con Java Mail
package pe.xxx.processor.util;
import java.util.List;
import java.util.Properties;
import javax.mail.Address;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
@devniel
devniel / gist:297f3a3043e63ae252f7
Created May 17, 2015 02:29
log error cloud foundry bluemix
This file has been truncated, but you can view the full file.
dev:concytec-datos devniel$ CF_TRACE=true cf push
VERSION:
6.6.2-0c953cf
Using manifest file /Users/devniel/dev/php/concytec-datos/manifest.yml
REQUEST: [2015-05-16T21:05:57-05:00]
POST /UAALoginServerWAR/oauth/token HTTP/1.1
def index(request):
verb = str(request.GET.get('verb'))
metadataPrefix = str(request.GET.get('metadataPrefix'))
set = str(request.GET.get('set'))
print inspect.getmembers(clouai, predicate=inspect.ismethod)
print clouai.__dict__
print dir(clouai)
pprint(clouai)
resp = clouai.handleRequest(request.GET)
response = HttpResponse(resp, content_type="text/xml")
@devniel
devniel / testing_tool
Last active August 29, 2015 14:24
tool for hackers that are on a testing area because of a lack of projects on your company ... meh.
# -*- coding: ISO-8859-1 -*-
from openpyxl import load_workbook
from collections import *
from StringIO import StringIO
import xml.etree.ElementTree as ET
import sys
def parse(__NOMBRE_ARCHIVO_EXCEL, __NOMBRE_ARCHIVO_XML, __CELDA_INICIO, __CELDA_FIN, __CELDA_DATA_INICIO, __CELDA_DATA_FIN ):
this.create = function(data, fn){
// Obtener clase
var Class = require("./../models/Class");
Class.readByName(data.class, function(err, _class){
if(err) return fn(err);
// Parse properties
box-shadow: inset 0px 1px 5px rgba(0, 0, 0, 0.1);
-------------------
color: rgb(103, 103, 103);
font-family: 'Titillium-Light';
font-weight: 300;
@devniel
devniel / test_clone.py
Last active August 27, 2015 18:57
clone a string with a percentage of similarity
# -*- coding: utf-8 -*-
from datetime import datetime, timedelta
import random
import unittest
import difflib
def ratio(original, changed):
changes = 0
u = zip(original, changed)
@devniel
devniel / layout.less
Created October 6, 2015 19:51
braph layout grid v0.0.1
// LAYOUT
.layout-grid-12 {
width: 100%;
&::after {
display: block;
content: " ";
clear: both;
}
package pe.com.primax.appprimax;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.location.Address;
import android.location.Geocoder;
// Setup axis chart
_chart.setHighlightPerTapEnabled(true);
_chart.setHighlightPerDragEnabled(true);
_chart.setPinchZoom(false);
_chart.setDescription(null);
_chart.setDoubleTapToZoomEnabled(false);
_chart.animateX(1000, Easing.EasingOption.EaseInOutBack);