Skip to content

Instantly share code, notes, and snippets.

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

Gustavo Herrera arcanoix

Developer Code Now Work
View GitHub Profile
arcanoix /
Created November 18, 2022 23:34 — forked from Tamal/
Solution for 'ssh: connect to host port 22: Connection timed out' error
$ git clone my-awesome-proj
Cloning into 'my-awesome-proj'...
ssh: connect to host port 22: Connection timed out
fatal: Could not read from remote repository.
$ # This should also timeout
$ ssh -T
ssh: connect to host port 22: Connection timed out
$ # but this might work
arcanoix / readcfdi.php
Created April 19, 2021 16:47 — forked from goedecke/readcfdi.php
Extraer información de CFDI XML facil con simplexml
View readcfdi.php
$xml = simplexml_load_file('test.xml');
$ns = $xml->getNamespaces(true);
$xml->registerXPathNamespace('c', $ns['cfdi']);
$xml->registerXPathNamespace('t', $ns['tfd']);
foreach ($xml->xpath('//cfdi:Comprobante') as $cfdiComprobante){
echo $cfdiComprobante['version'];
arcanoix /
Created April 7, 2021 19:45 — forked from Klerith/
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 / 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.
View cerToPem.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)
arcanoix / git.txt
Created December 28, 2020 23:58
Git en rama incorrecta, Solucion..!!!
View git.txt
#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
arcanoix / 📊 Weekly development breakdown
Last active January 5, 2021 00:16
Weekly development breakdown
View 📊 Weekly development breakdown
Blade Template 38 mins ███████▌░░░░░░░░░░░░░ 35.8%
YAML 35 mins ██████▉░░░░░░░░░░░░░░ 32.9%
PHP 26 mins █████▏░░░░░░░░░░░░░░░ 24.6%
Other 7 mins █▍░░░░░░░░░░░░░░░░░░░ 6.8%
View Install composer on Amazon AMI running on EC2
$ cd ~
$ sudo curl -sS | 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 / index.vue
Created August 13, 2020 00:50
componente padre index.vue con notice hijo
View index.vue
<span slot="tools">
<a href="#dlgNewNotice" class="btn btn-icon-toggle" data-toggle="modal">
<i class="fa fa-plus-square"></i>
<span slot="title">Avisos</span>
arcanoix /
Created July 17, 2020 15:31 — forked from heiswayi/
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
arcanoix /
Created July 16, 2020 23:10 — forked from ddffx/
Turn on design mode on Google Chrome to enable webpage editing
  1. Open Chrome, open any webpage
  2. Right click on the page and select Inspect from the Context menu to open the Developer Console
  3. Go to Console tab and type:
document.designMode = 'on'
  1. Start editing the page by clicking anywhere