Skip to content

Instantly share code, notes, and snippets.

View pulketo's full-sized avatar

Pulketo pulketo

View GitHub Profile
@pulketo
pulketo / gist:8df4aa21af675c8877840a49bbc08a34
Created February 23, 2019 17:44
input html format javascript
https://nosir.github.io/cleave.js/
WebServer alternatives:
h2o: https://h2o.examp1e.net/configure/fastcgi_directives.html#fastcgi.connect
gwan:
lwan:
Json Restful Storage Engine:
https://kronuz.io/Xapiand/docs/quickstart/
FB PHP login:
https://github.com/justfede/php-simple-facebook-login
WP
https://docs.woocommerce.com/document/handle-multiple-regions-currencies-woocommerce/
@pulketo
pulketo / gist:e31f64098809ce9c1364e648278327ae
Created September 5, 2019 17:28
gnome-control-center will show empty window (Fix)
env XDG_CURRENT_DESKTOP=GNOME gnome-control-center
@pulketo
pulketo / tool.php
Created September 9, 2019 01:26 — forked from damienalexandre/tool.php
Download large file from the web via php
<?php
/**
* Download a large distant file to a local destination.
*
* This method is very memory efficient :-)
* The file can be huge, PHP doesn't load it in memory.
*
* /!\ Warning, the return value is always true, you must use === to test the response type too.
*
* @author dalexandre
@pulketo
pulketo / gist:11895dd54c9c9c0320ce525f45b22862
Created September 12, 2019 08:03
memoria instalacion haproxy desde sources muchos errores (quitarlos)
Parte I:
1 yum update
2 yum install -y nano vim git
3 yum install haproxy
4 cd
5 ls -lrt
6 wget
7 yum install wget axel vi nano
8 wget
9 wget
[root@lxmp1 ~]# timedatectl list-timezones | grep -i xico
America/Mexico_City
[root@lxmp1 ~]# timedatectl set-timezone America/Mexico_City
[root@lxmp1 ~]# timedatectl
Local time: Mon 2019-09-16 21:29:13 CDT
Universal time: Tue 2019-09-17 02:29:13 UTC
RTC time: Tue 2019-09-17 02:29:13
Time zone: America/Mexico_City (CDT, -0500)
NTP enabled: yes
NTP synchronized: yes
@pulketo
pulketo / gist:bb46094bf4a91cf2209a5dceffad2b0f
Created October 30, 2019 03:33
per program volume control from cli terminal
sudo apt-get install libpulse-dev ; # ubuntu...
git clone https://github.com/rhaas80/pa_volume && cd pa_volume
make
➜ pa_volume git:(master) ✗ ./pa_volume
client: Firefox 85%
client: AudioIPC Server 79%
client: mpv Media Player 0%
➜ pa_volume git:(master) ✗ ./pa_volume Firefox 95%
➜ pa_volume git:(master) ✗ ./pa_volume Firefox 75%
@pulketo
pulketo / gist:56e6bf3d43ac0c035cc071caf620b553
Created October 9, 2019 20:26
xmodmap xinput teclas cambiar funcion bind i3
$ xinput list
xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Sleep Button id=8 [slave keyboard (3)]
@pulketo
pulketo / gist:e01a0383bce8176ba977f0b64b56ca3c
Created November 2, 2019 06:53
mysql collation error import
To see which charset and collations we have:
SHOW CHARACTER SET
then sed what we don't have for what we have
@pulketo
pulketo / gist:41010e6ec1b574bebd1b442fa31717c8
Created November 5, 2019 02:52
mpsyt http not supported
mkdir -p ~/src/pafy
git clone git@github.com:mps-youtube/pafy.git ~/src/pafy
cd ~/src/pafy
MPSYT=`which mpsyt`
MPSYT_PYTHON=`head -1 $MPSYT | cut -d'!' -f 2`
$MPSYT_PYTHON -m pip install .
#source https://github.com/mps-youtube/mps-youtube/issues/986