Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View francoism90's full-sized avatar
😸
Cuddling the cat

François M. francoism90

😸
Cuddling the cat
  • FoxWS
  • Netherlands
View GitHub Profile
@danalmeida
danalmeida / generate-gifs.bash
Last active November 21, 2016 16:33
Create and optmize gif files through command line, requires ImageMagick and gifsicle
#!/bin/bash
# Generate gifs from jpg sequence
convert +repage -fuzz 0.0%% -delay 4 -loop 0 *.jpg -layers OptimizePlus -layers OptimizeTransparency "gif-00.gif"
convert +repage -fuzz 0.5%% -delay 4 -loop 0 *.jpg -layers OptimizePlus -layers OptimizeTransparency "gif-05.gif"
convert +repage -fuzz 1.0%% -delay 4 -loop 0 *.jpg -layers OptimizePlus -layers OptimizeTransparency "gif-10.gif"
convert +repage -fuzz 1.5%% -delay 4 -loop 0 *.jpg -layers OptimizePlus -layers OptimizeTransparency "gif-15.gif"
convert +repage -fuzz 2.0%% -delay 4 -loop 0 *.jpg -layers OptimizePlus -layers OptimizeTransparency "gif-20.gif"
convert +repage -fuzz 2.5%% -delay 4 -loop 0 *.jpg -layers OptimizePlus -layers OptimizeTransparency "gif-25.gif"
convert +repage -fuzz 3.0%% -delay 4 -loop 0 *.jpg -layers OptimizePlus -layers OptimizeTransparency "gif-30.gif"
@plasticbrain
plasticbrain / gist:3887245
Created October 14, 2012 04:00
PHP: mime types (array format)
<?php
$mime_types = array(
'.3dm' => 'x-world/x-3dmf',
'.3dmf' => 'x-world/x-3dmf',
'.a' => 'application/octet-stream',
'.aab' => 'application/x-authorware-bin',
'.aam' => 'application/x-authorware-map',
'.aas' => 'application/x-authorware-seg',
'.abc' => 'text/vnd.abc',
'.acgi' => 'text/html',
@mpalourdio
mpalourdio / php-cs-fixer
Created November 12, 2014 21:24
@fabpot php-cs-fixer config for PhpStorm
parameters
--level=psr2 --verbose fix $FileDir$/$FileName$
working directory
$ProjectFileDir$
@starvsion
starvsion / Dockerfile
Created May 21, 2019 03:12
Vessel App Fedora Version (these are files inside docker/app)
# __DIR.'/docker'
FROM fedora:30
RUN useradd -ms /bin/bash -u 1337 vessel
WORKDIR /var/www/html
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN echo "fastestmirror=true" >> /etc/dnf/dnf.conf
@petericebear
petericebear / .php_cs
Last active June 26, 2023 02:32
Laravel 5.x php-cs-fixer config file
<?php
$finder = Symfony\Component\Finder\Finder::create()
->notPath('bootstrap/cache')
->notPath('storage')
->notPath('vendor')
->in(__DIR__)
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
@servers(['web' => $user.'@'.$host,'localhost' => '127.0.0.1'])
@setup
// Sanity checks
if (empty($host)) {
exit('ERROR: $host var empty or not defined');
}
if (empty($user)) {
exit('ERROR: $user var empty or not defined');
}
@JacobBennett
JacobBennett / blog.md
Last active October 21, 2023 17:30
Clean up your Vue modules with ES6 Arrow Functions

Recently when refactoring a Vue 1.0 application, I utilized ES6 arrow functions to clean up the code and make things a bit more consistent before updating to Vue 2.0. Along the way I made a few mistakes and wanted to share the lessons I learned as well as offer a few conventions that I will be using in my Vue applications moving forward.

The best way to explain this is with an example so lets start there. I'm going to throw a rather large block of code at you here, but stick with me and we will move through it a piece at a time.

<script>

// require vue-resource...

new Vue({
@aldur
aldur / nfs_automount.sh
Last active December 3, 2023 10:08
Mount an NFS share on Android
#!/bin/sh
# Mount an NFS share on Android
# Requirements:
# - Busybox
# - A kernel supporting nfs (either built-in or as a module)
# On my Nexus 7 2012 I use the following kernel:
# http://forum.xda-developers.com/showthread.php?t=2107224
# Remember: if you have problems of system space, simply delete some of the default stuff.
@bcomnes
bcomnes / redshift.conf
Created December 9, 2012 07:35
My configuration file for Redshift. Place it in ~/.config/ Drag redshift onto the Startup Applications menu to have it boot on start
; Global settings
[redshift]
temp-day=6500K
temp-night=5000
transition=1
;gamma=0.8:0.7:0.8
gamma=1.000:1.000:1.000
location-provider=geoclue
;location-provider=manual
adjustment-method=vidmode
@sbuzonas
sbuzonas / nginx-cors.conf
Created September 8, 2015 15:36
Nginx CORS maps
map $http_origin $allow_origin {
default "";
"~^https?://(?:[^/]*\.)?(stevebuzonas\.(?:com|local))(?::[0-9]+)?$" "$http_origin";
}
map $request_method $cors_method {
default "allowed";
"OPTIONS" "preflight";
}