Skip to content

Instantly share code, notes, and snippets.

View arcanoix's full-sized avatar
:octocat:
Developer Code Now Work

Gustavo Herrera arcanoix

:octocat:
Developer Code Now Work
View GitHub Profile
@arcanoix
arcanoix / git-ssh-error-fix.sh
Created November 18, 2022 23:34 — forked from Tamal/git-ssh-error-fix.sh
Solution for 'ssh: connect to host github.com port 22: Connection timed out' error
$ git clone git@github.com:xxxxx/xxxx.git my-awesome-proj
Cloning into 'my-awesome-proj'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
$ # This should also timeout
$ ssh -T git@github.com
ssh: connect to host github.com port 22: Connection timed out
$ # but this might work
@arcanoix
arcanoix / index.html
Created October 27, 2017 17:59
VueJS Personality Quiz
<div id="app" v-cloak>
<div class="row">
<div class="large-12 columns">
<h1>{{ quiz.title }}</h1>
<div class="callout">
<div v-for="(question, index) in quiz.questions">
<!-- Hide all questions, show only the one with index === to current question index -->
@arcanoix
arcanoix / readcfdi.php
Created April 19, 2021 16:47 — forked from goedecke/readcfdi.php
Extraer información de CFDI XML facil con simplexml
<?php
$xml = simplexml_load_file('test.xml');
$ns = $xml->getNamespaces(true);
$xml->registerXPathNamespace('c', $ns['cfdi']);
$xml->registerXPathNamespace('t', $ns['tfd']);
//EMPIEZO A LEER LA INFORMACION DEL CFDI E IMPRIMIRLA
foreach ($xml->xpath('//cfdi:Comprobante') as $cfdiComprobante){
echo $cfdiComprobante['version'];
@arcanoix
arcanoix / init-rn.md
Created April 7, 2021 19:45 — forked from Klerith/init-rn.md
Comando para crear aplicación de React Native con TypeScript

Comando para crear un proyecto de RN con TS

npx react-native init AwesomeTSProject --template react-native-template-typescript
@arcanoix
arcanoix / cerToPem.php
Created March 24, 2021 23:27 — forked from brankoajzele/cerToPem.php
Converting .cer to .pem via pure PHP, (no system, backticks, shell_exec, exec, etc.) to get the same result as with "openssl x509 -inform der -in cert.cer -out cert.pem". Note, I am not expert on certificates, etc. This specific certificate conversion simply worked for me.
<?php
$certificateCAcer = '/certificate.cer';
$certificateCAcerContent = file_get_contents($certificateCAcer);
/* Convert .cer to .pem, cURL uses .pem */
$certificateCApemContent = '-----BEGIN CERTIFICATE-----'.PHP_EOL
.chunk_split(base64_encode($certificateCAcerContent), 64, PHP_EOL)
.'-----END CERTIFICATE-----'.PHP_EOL;
@arcanoix
arcanoix / link_simbolic.txt
Last active March 12, 2021 19:53
Crear Link Simbolico en el servidor compartido para laravel
@arcanoix
arcanoix / 📊 Weekly development breakdown
Last active January 5, 2021 00:16
Weekly development breakdown
Blade Template 38 mins ███████▌░░░░░░░░░░░░░ 35.8%
YAML 35 mins ██████▉░░░░░░░░░░░░░░ 32.9%
PHP 26 mins █████▏░░░░░░░░░░░░░░░ 24.6%
Other 7 mins █▍░░░░░░░░░░░░░░░░░░░ 6.8%
@arcanoix
arcanoix / git.txt
Created December 28, 2020 23:58
Git en rama incorrecta, Solucion..!!!
#Git ¿Hiciste un commit en la rama incorrecta y no sabes cómo arreglarlo? Don't panic! 😱
1️⃣ Ejecuta "git log" para ver tu historial de commits
2️⃣ Copia el hash del commit
3️⃣ Ve a la rama correcta y ejecuta "git cherry-pick" 🍒
+ el hash
$ cd ~
$ sudo curl -sS https://getcomposer.org/installer | sudo php
$ sudo mv composer.phar /usr/local/bin/composer
$ sudo ln -s /usr/local/bin/composer /usr/bin/composer
then you can run
$ sudo composer install
@arcanoix
arcanoix / index.vue
Created August 13, 2020 00:50
componente padre index.vue con notice hijo
<template>
<div>
<card>
<span slot="tools">
<a href="#dlgNewNotice" class="btn btn-icon-toggle" data-toggle="modal">
<i class="fa fa-plus-square"></i>
</a>
</span>
<span slot="title">Avisos</span>