Skip to content

Instantly share code, notes, and snippets.

View Lukas238's full-sized avatar
🏠
Working from home

Lucas Dasso Lukas238

🏠
Working from home
View GitHub Profile
@Lukas238
Lukas238 / gitbackup.php
Last active January 21, 2022 19:51 — forked from kiang/gist:9224e139320c230fedc5
Batch push files into git repo with size limitation in each commit
<?php
/**
* This script will list all modified/untracked/deleted git files, with their relative path,
* and add them to a commit group until the group pass 25mb in size, and then will push it.
*
* To run this script on the repository root folder by using this command `php gitbackup.php`.
*
* Requirements: PHP need to be able to run `exec`.
*/
@Lukas238
Lukas238 / bookmarklet
Last active August 26, 2020 06:05 — forked from thomaspark/bootswatchlet.js
Bootswatch bookmarklet - Updated 2020
javascript:(function(e%2Ca%2Cg%2Ch%2Cf%2Cc%2Cb%2Cd)%7Bif(!(f%3De.jQuery)%7C%7Cg%3Ef.fn.jquery%7C%7Ch(f))%7Bc%3Da.createElement(%22script%22)%3Bc.type%3D%22text%2Fjavascript%22%3Bc.src%3D%22%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F%22%2Bg%2B%22%2Fjquery.min.js%22%3Bc.onload%3Dc.onreadystatechange%3Dfunction()%7Bif(!b%26%26(!(d%3Dthis.readyState)%7C%7Cd%3D%3D%22loaded%22%7C%7Cd%3D%3D%22complete%22))%7Bh((f%3De.jQuery).noConflict(1)%2Cb%3D1)%3Bf(c).remove()%7D%7D%3Ba.documentElement.childNodes%5B0%5D.appendChild(c)%7D%7D)(window%2Cdocument%2C%221.3.2%22%2Cfunction(%24%2CL)%7Bif(%24(%22.bootswatcher%22)%5B0%5D)%7B%24(%22.bootswatcher%22).remove()%7Delse%7Bvar%20%24e%3D%24('%3Cselect%20class%3D%22bootswatcher%22%3E%3Coption%3Ecerulean%3C%2Foption%3E%3Coption%3Ecosmo%3C%2Foption%3E%3Coption%3Ecyborg%3C%2Foption%3E%3Coption%3Edarkly%3C%2Foption%3E%3Coption%3Eflatly%3C%2Foption%3E%3Coption%3Ejournal%3C%2Foption%3E%3Coption%3Elitera%3C%2Foption%3E%3Coption%3Elumen%3C%2Foption%3E%3Coption%3Elux%3C%2Foption%3E
@Lukas238
Lukas238 / increase_replace.js
Created October 2, 2019 04:57 — forked from Axighi/increase_replace.js
Using regex to replace match strings with auto increment number.
'An aplle is not a banana'.replace(/a/g, (() => {
var number = 0;
return () => {
return number++;
}
})())
@Lukas238
Lukas238 / xampp_ssl_setup.md
Last active March 12, 2018 19:48
XAMPP - SSL certificate error

XAMPP - CURL SSL Setup

To fix the SSL certificate error message "SSL certificate error: unable to get local issuer certificate" try this:

  • Download the cert to the PHP instalation folder.
    • Manualy:
    • With wget: wget http://curl.haxx.se/ca/cacert.pem -P C:\xampp\php\extras\ssl\
  • Open c:\xampp\php\php.ini with Notepad++

Youtube API3 + jQuery: Playlist items to itemsHTML and Magnific Popup

Retive a JSON of videos by video ID and build the HTML for the videos.

A Pen by Lucas Dasso on CodePen.

License.