Skip to content

Instantly share code, notes, and snippets.

@nicolasegp
nicolasegp / .prettierrc
Created March 30, 2022 18:06
Prettier personal JS/TS
{
"singleQuote": true,
"useTabs": true,
"tabWidth": 4,
"semi": false
}
@nicolasegp
nicolasegp / snippet.json
Created November 6, 2020 01:23
Snippet VSC: Imprimir Arrays PHP
{
"Imprimir Arrays": {
"scope": "php",
"prefix": "_pre",
"body": [
"echo '<pre>'.print_r($${1:array}, true).'</pre>';"
],
"description": "Imprimir Arrays"
}
}
@nicolasegp
nicolasegp / netnotify.py
Created August 4, 2020 00:39
Avisa cuando llega el Internet vía Telegram
#!/bin/python3
import time
import curses
import socket
import requests
import subprocess
host = '1.1.1.1'
chat = '*****'
@nicolasegp
nicolasegp / Bancos.csv
Created May 28, 2019 23:20
Códigos de Bancos de Venezuela
Código Banco
0156 100%BANCO
0196 ABN AMRO BANK
0172 BANCAMIGA BANCO MICROFINANCIERO, C.A.
0171 BANCO ACTIVO BANCO COMERCIAL, C.A.
0166 BANCO AGRICOLA
0175 BANCO BICENTENARIO
0128 BANCO CARONI, C.A. BANCO UNIVERSAL
0001 BANCO CENTRAL DE VENEZUELA.
0164 BANCO DE DESARROLLO DEL MICROEMPRESARIO
@nicolasegp
nicolasegp / windscribe-archlinux.md
Last active February 5, 2019 19:31
Windscribe VPN

Install in ArchLinux

yay -S windscribe-cli

Start service and session

@nicolasegp
nicolasegp / deepin-qt.md
Last active January 29, 2019 12:53
Editar temas de aplicaciones QT en Deepin (Comentarios en https://youtu.be/r3jjOtXJ6FM)

Editar archivo .profile

  1. En la terminal: (Cambiar "nicolas" por tu usuario)
nano /home/nicolas/.profile
  1. Agregar
export QT_STYLE_OVERRIDE=gtk
@nicolasegp
nicolasegp / youtube.sh
Created November 22, 2018 21:55
Youtube MPV
#!/bin/bash
# zenity for GTK
# qarma for QT
Pack="qarma"
Url=$($Pack --title "Youtube" --entry --text "Url YouTube")
OP=$($Pack --title "Youtube" --list --text "Select Option" --column "#" --column "Desc." "1" "Only Audio" "2" "Video 480p" "3" "Video 720p" "4" "Video 1080p")
case $OP in
@nicolasegp
nicolasegp / App.php
Last active May 7, 2018 01:39
PHP Array dot access data
<?php
class App {
const SP = '.';
const SP_REGEXP = '/[^\w.]/'; // if use " / " change to '/[^\w\/]/'
protected static $Data = [];
public static function set($Path, $Value = null) {
$Path = self::clean_path($Path);
<?php
/**
* https://www.php-fig.org | PSR-1 , PSR-4
*/
spl_autoload_register(function ($Class) {
$Class = ltrim($Class, '\\');
$_P = explode('\\', $Class);
$_P[] = str_replace('_', DIRECTORY_SEPARATOR, array_pop($_P));
$Class = implode(DIRECTORY_SEPARATOR, $_P).'.php';
@nicolasegp
nicolasegp / event.class.php
Last active May 28, 2023 22:06
[PHP] Eventos y Disparadores
<?php
/**
*
* Eventos y Disparadores
* @author Nicolás Giacaman <[email protected]>
* @url http://nicolasg.cf
* @fork https://gist.github.com/im4aLL/548c11c56dbc7267a2fe96bda6ed348b
*
*/