Skip to content

Instantly share code, notes, and snippets.

David Noreña juavidn

Block or report user

Report or block juavidn

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
@juavidn
juavidn / dv-dian.js
Last active Dec 20, 2016
Script para generar el Digito de Verificacion de Nits o Cedulas de la DIAN Colombia
View dv-dian.js
function GeneraDV(nit) {
var aPeso = [ 71, 67, 59, 53, 47, 43, 41, 37, 29, 23, 19, 17, 13, 7, 3 ];
if (typeof nit !== "string") { throw new Error("El NIT debe ser una cadena de texto"); }
// Limpiar Espacios, Comas, Puntos, Guiones y Comillas
nit = nit.replace( /\s/g,"").replace(/,/g,"").replace(/\./g,"").replace (/-/g,"").replace(/'/g,"");
if (isNaN(nit)) {
throw new Error("El NIT contiene caracteres especiales");
View CA_Test.cert
-----BEGIN CERTIFICATE-----
MIIFdjCCBF6gAwIBAgIQLWUbaFQoVZJC66sI/OmUYDANBgkqhkiG9w0BAQsFADBC
MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMS
UmFwaWRTU0wgU0hBMjU2IENBMB4XDTE2MTAxNzAwMDAwMFoXDTE3MTIxNjIzNTk1
OVowHDEaMBgGA1UEAwwRKi5jeWFub2dlbm1vZC5vcmcwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQDWt4Dago3bImFNveaCM/u0doRLKNfifCv6J8UOhQtX
XoTqjG0Yp/9d+1jz7utq0H4lRs4vIYbJarkZ8gRC1NlZPHy6DIE+a8x/nWF2SIul
TRpGSJUIzSfpejjGfWOIbo4cQi/cIEmdsb2YPWJc5nKdweUS4pJ+ETESehbQLAr0
23NZzzgJe7GzdlVZVFQEpIaOsWZ7tY0tQHFm83yxAG1zTqPANB8ChEKFieRKevRm
77s/7GzkL2ap6CwQ3k2EprobjefKRSxu9gVBMIn/y5+Az04IY7i26APibx11B/ZG
View g760.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remove-project name="CyanogenMod/android_packages_apps_CMUpdater" />
<project name="mparus/android_device_huawei_g760-caf" path="device/huawei/g760" revision="master" />
<project name="mparus/android_kernel_huawei_msm8916-caf" path="kernel/huawei/msm8916" revision="cm-13.0" />
<project name="mparus/android_vendor_huawei_g760-caf" path="vendor/huawei/g760" revision="master" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" revision="cm-13.0" />
<!--<project name="CyanogenMod/android_hardware_qcom_fm" path="hardware/qcom/fm" remote="github" />-->
</manifest>
View kernel-3.1.patch
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index 581a5ae..6be0aa5 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -67,7 +67,7 @@
g_webcam-y := webcam.o
g_ncm-y := ncm.o
g_acm_ms-y := acm_ms.o
-g_android-y := android.o
+g_android-y := android.o f_hid.o
@juavidn
juavidn / README.md
Last active Sep 17, 2016
Symfony3 Setting up or Fixing File Permissions Using ACL on a System that Supports setfacl BASH SCRIPT
View README.md
  1. Save the file as fixsysperms.sh
  2. Set execution permission: $ chmod +x fixsymperms.sh
  3. If you want to use it globally: $ sudo cp fixsymperms.sh /usr/local/bin/fixsymperms
View NPerGroup.php
<?php
namespace App\Traits;
trait NPerGroup {
/**
* query scope nPerGroup
*
* @return void
*/
You can’t perform that action at this time.