Skip to content

Instantly share code, notes, and snippets.

View Yago's full-sized avatar
👨‍💻

Yann Gouffon Yago

👨‍💻
View GitHub Profile
@Yago
Yago / photoswipe-script.js
Created November 11, 2015 09:57
PhotoSwipe - Script
var container = [];
$('#gallery').find('figure').each(function(){
var $link = $(this).find('a'),
item = {
src: $link.attr('href'),
w: $link.data('width'),
h: $link.data('height'),
title: $link.data('caption')
};
@Yago
Yago / photoswipe-init.js
Created November 11, 2015 09:55
PhotoSwipe - init
var gallery = new PhotoSwipe($pswp, PhotoSwipeUI_Default, container, options);
gallery.init();
@Yago
Yago / photoswipe-install.html
Created November 11, 2015 09:54
Photoswipe - Install
<link rel="stylesheet" href="photoswipe.css">
<link rel="stylesheet" href="default-skin/default-skin.css">
<script src="photoswipe.js"></script>
<script src="photoswipe-ui-default.js"></script>
@Yago
Yago / pswp.html
Created November 6, 2015 13:44
PhotoSwipe wrapper
<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
<!-- Background of PhotoSwipe.
It's a separate element as animating opacity is faster than rgba(). -->
<div class="pswp__bg"></div>
<!-- Slides wrapper with overflow:hidden. -->
<div class="pswp__scroll-wrap">
<!-- Container that holds slides.
PhotoSwipe keeps only 3 of them in the DOM to save memory.
Don't modify these 3 pswp__item elements, data is added later on. -->
@Yago
Yago / photoswipe-demo.html
Last active December 28, 2024 15:02
PhotoSwipe demo
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>PhotoSwipe demo</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<!-- Import PhotoSwipe Styles -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.0/photoswipe.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.0/default-skin/default-skin.css">
#!/usr/bin/env python
import urllib2
import os, sys
import time
import random
# map zoom 8, zoomlevel 22
# tiles x: 750, tiles y: 500
@Yago
Yago / dir-to-cbm.sh
Created January 24, 2015 12:47
Directory to CBR process
for dir in *; do\
zip ${dir} ${dir}/*\
done
--------------
for f in *.zip; do \
mv -- "$f" "${f%.zip}.cbr"\
done
@Yago
Yago / process.sh
Created December 1, 2014 12:49
Terminal - Process
$ nohup ...
$ ps aux
$ kill ...
http://www.cyberciti.biz/faq/kill-process-in-linux-or-terminate-a-process-in-unix-or-linux-systems/
<h3>Pureté</h3>
<div class="row">
<div class="col-sm-4">
<img src="monimage.jpg" alt="">
</div>
<div class="col-sm-4">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ego in hoc resisto; Hic nihil fuit, quod quaereremus.
</p>
</div>
@Yago
Yago / select.css
Created November 5, 2014 13:27
CSS - Pretty select
select {
width: auto;
max-width: 100%;
appearance: menulist-button;
align-items: center;
background-color: $white;
border: 1px solid $dust;
box-sizing: border-box;
color: $mine;
height: 34px;