Skip to content

Instantly share code, notes, and snippets.

View mikaoelitiana's full-sized avatar

Mika Andrianarijaona mikaoelitiana

View GitHub Profile
@schacon
schacon / gist:942899
Created April 26, 2011 19:19
delete all remote branches that have already been merged into master
$ git branch -r --merged |
grep origin |
grep -v '>' |
grep -v master |
xargs -L1 |
awk '{split($0,a,"/"); print a[2]}' |
xargs git push origin --delete
<?php
// embed HTML 5 Video Player
// Standbild
$file_poster['filename'] = 'startbild.png';
$file_poster['filepath'] = 'sites/default/files/startbild.png';
// Webkit browser & Flash
$file_mp4['filename'] ='film_2.mp4';
$file_mp4['filemime'] = 'video/mp4';
$file_mp4['filepath'] = 'sites/default/files/film_2.mp4';
@matiskay
matiskay / widget-skeleton.php
Created December 14, 2011 19:22
Wordpress Widget Skeleton
<?php
class Widget_Name extends WP_Widget {
function Widget_Name() {
$widget_opts = array(
'classname' => 'your-awesome-class',
'description' => 'Your awesome Description',
);
@sindresorhus
sindresorhus / post-merge
Last active May 2, 2024 03:18
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
@beevelop
beevelop / README.md
Last active April 17, 2020 03:35
Taiga Docker-Compose
1. Install and run the docker-compose.yml
git clone https://gist.github.com/1975674c22ce8948c895.git taiga
cd taiga
# Update docker-compose.yml
# - Replace Hostname of taigaback and taigafront
# - Update or disable Email settings
docker-compose up -d
@welcoMattic
welcoMattic / imagemin.md
Last active February 15, 2022 20:58
How to fix `Error: spawn ./node_modules/jpegtran-bin/vendor/jpegtran ENOENT` error for imagemin

If you're trying to run imagemin (from grunt or gulp or anything else) on Alpine, you certainly had to meet this error :

Error: spawn /YOUR_PROJECT_PATH/node_modules/jpegtran-bin/vendor/jpegtran ENOENT or the same with optipng or gifsicle instead of jpegtran.

Here's how to solve it.

First you need to install on Alpine missing package used to compile jpegtran, gifsicle and optipng binaries. Those packages are (at least):

autoconf automake file build-base nasm musl libpng-dev zlib-dev

@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active July 22, 2024 17:14
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@zulhfreelancer
zulhfreelancer / README.md
Last active January 28, 2021 22:33
How to install Flynn on single host (single-node mode)?

$ sudo bash -c "$(curl -s https://gist.githubusercontent.com/zulhfreelancer/0b87a274686cb4d98b8144e116c5117c/raw)"

@jmichealson
jmichealson / user-data.txt
Last active September 5, 2018 09:41 — forked from heri16/user-data.txt
Docker-CE Cloud-init for Ubuntu 16.04 (LTS)
#cloud-config
# Upgrade the instance on first boot
# (ie run apt-get upgrade)
#
# Default: false
# Aliases: apt_upgrade
package_upgrade: true
# Install additional packages on first boot
@barsumek
barsumek / introspectionQuery.txt
Created November 22, 2018 12:42
Detox your GraphQL: Introspection Query
query IntrospectionQuery {
__schema {
queryType {
name
}
mutationType {
name
}
types {
...FullType