Skip to content

Instantly share code, notes, and snippets.

View anglol's full-sized avatar

Richard Lavigne anglol

  • Marien & Léonard
  • Bordeaux
View GitHub Profile
@jordanmkoncz
jordanmkoncz / .react-navigation iOS 11 Navigation Bar with Large Title
Last active May 9, 2022 16:21
react-navigation iOS 11 Navigation Bar with Large Title
#
import React, { ReactDOM, Component, PropTypes } from 'react';
import {render} from 'react-dom';
import { Router, Route, Link, browserHistory} from 'react-router'
/** React router hello world example **/
class App extends Component {
render() {
@julianxhokaxhiu
julianxhokaxhiu / pagespeed_optimize_images.sh
Last active April 15, 2024 22:49
Recursively optimize all PNG and JPG files wherever they are from the script position and inner ( based on OPTING, PNGCRUSH, ADVANCECOMP and JPEGOPTIM )
#!/bin/bash
# Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462
find . -type f -iname "*.png" -exec optipng -nb -nc {} \;
find . -type f -iname "*.png" -exec advpng -z4 {} \;
find . -type f -iname "*.png" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \;
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim -f --strip-all {} \;
sudo yum -y install gcc gcc-c++ kernel-devel
sudo yum -y install python-devel libxslt-devel libffi-devel openssl-devel
pip install cryptography
@pcreux
pcreux / convert-to-ipad.rb
Last active July 26, 2022 01:09
ffmpeg - avi to mp4 - iPad
# ruby convert-to-ipad.rb video1.avi video2.avi video3.avi
#
# Prereq: brew install ffmpeg
ARGV.each do |input_file|
output_file = input_file.gsub('.avi', '.ipad.mp4')
cmd = "ffmpeg -i #{input_file} -acodec aac -ac 2 -strict experimental -ab 160k -s 1024x768 -vcodec libx264 -preset slow -profile:v baseline -level 30 -maxrate 10000000 -bufsize 10000000 -b 1200k -f mp4 -threads 0 #{output_file}"
puts cmd
system cmd
end