Skip to content

Instantly share code, notes, and snippets.

@asper
asper / lightbox-list.txt
Created May 11, 2023 19:24
List of LightBoxes
https://fslightbox.com
https://biati-digital.github.io/glightbox/
https://midzer.github.io/tobii/demo/
https://onycat.com/vue-easy-lightbox/
https://frontend-collective.github.io/react-image-lightbox/
https://simplelightbox.com
https://nanogallery2.nanostudio.org
https://photoswipe.com
https://www.lightgalleryjs.com
https://picview.org
<?php
set_time_limit(0);
foreach (glob('./svg/*.svg') as $filename) {
$out = str_replace('svg', 'emf', $filename);
exec('inkscape --file '.$filename.' --export-emf '.$out);
}
@asper
asper / www.example.com
Created December 14, 2013 15:53
exemple website nginx config file
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts to this file
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
@asper
asper / default
Created December 13, 2013 23:39
Default Nginx site conf
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts to this file
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
@asper
asper / nginx.conf
Last active December 31, 2015 07:19
nginx conf file
user www-data;
# As a thumb rule: One per CPU. If you are serving a large amount
# of static files, which requires blocking disk reads, you may want
# to increase this from the number of cpu_cores available on your
# system.
#
# The maximum number of connections for Nginx is calculated by:
# max_clients = worker_processes * worker_connections
worker_processes 1;
<script type="text/javascript">
window.addEvent('domready', function() {
var big_img = $$('#projects .realisation_big');
Element.implement({
setFocus: function(index) {
this.setAttribute('tabIndex', index || 0);
this.focus();
}
});
big_img.each(function(img, index){
@asper
asper / gist:5403539
Created April 17, 2013 11:24
Determine the final IP address with domain name and dns server
dig @ns1.example.com example.com
@asper
asper / ResizeOnceEvent.js
Created October 6, 2012 16:31
Mootools resize once event
/**
* ResizeOnce event
*
* In IE and Firefox the resize event is fired multiple times on window resize.
* This plugin provides a way to add events that are fired only once when the
* window is resized.
*
* Usage :
*
* window.addEvent('resizeOnce', function(){