Skip to content

Instantly share code, notes, and snippets.

View lidio601's full-sized avatar

Fabio Cigliano lidio601

View GitHub Profile
#!/bin/sh
#
# � 2010 Western Digital Technologies, Inc. All rights reserved.
#
# monitorVolume.sh
# Note: this is called by cron
#
#
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
@lidio601
lidio601 / convertMOD.py
Last active August 29, 2015 14:01
convert MOD+MOI video to AVI. In this case I need to convert my video camera output files (*.MOD + *.MOI) to AVI files to save disk space and have a more useful video format.
#!/usr/bin/python
# Script to import video from Panasonic SDR-H20 Camera
# This script is the same as SDCopy.exe utility in Windows
# Script copies mod files, renames them to "YYYY-MM-DD HH-MM.mpg" pattern, where "YYYY-MM-DD HH-MM" is creation time
# Script also can optionally set aspect ratio flag
# Made by m0sia (m0sia@plotinka.ru)
# Modified by lidio601
import os
UserInterfaceState.xcuserstate
Thumbs.db
*~
.git
.DS_Store
*.xcuserdatad
UserInterfaceState.xcuserstate
gitcheckout: {
master: {
options: {
branch: "master"
}
}
}
@gauteh
gauteh / .gitignore
Created November 5, 2011 23:19
python script for starring and liking google reader items from exported json (used to migrate starred and liked items), check http://gaute.vetsj.com/greader for web app version.
*.json
*.xml
token*
oauth*
@ifraixedes
ifraixedes / LICENSE
Last active May 6, 2018 06:44
AWS lambda handler which download images from S3, resizes them and upload the new ones to S3; tested with mocha, chai, sinon and proxyquire
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004
(http://www.wtfpl.net/about/)
Copyright (C) 2015 Mario Mendes (@hyprstack)
Copyright (C) 2015 Ivan Fraixedes (https://ivan.fraixed.es)
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
@lamogura
lamogura / nslog_macros.h
Created December 8, 2012 16:36
NSLog() Macros for iOS Development
// ***note*** this is ARC enabled code
// DLog will output like NSLog only when the DEBUG variable is set
// ALog will always output like NSLog
// ULog will show the UIAlertView only when the DEBUG variable is set
#define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#ifdef DEBUG
# define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
@ikbear
ikbear / idle.sh
Last active April 18, 2021 10:00
Docker image entrypoint idle script
#!/bin/bash
echo "This is a idle script (infinite loop) to keep container running."
echo "Please replace this script."
cleanup ()
{
kill -s SIGTERM $!
exit 0
}
@denniske
denniske / custom-solution.dart
Last active May 30, 2021 09:48
Flutter Modal bottom sheet will not overlap keyboard (Fixed)
import 'package:flutter/material.dart';
class CustomPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(),
floatingActionButton: FloatingActionButton(
onPressed: () {
showModalBottomSheet(
@tmcw
tmcw / togeo.py
Created August 11, 2012 18:53
geo-assign any arbitrary image to a geotiff usable in tilemill
import subprocess
import sys, re
MERC = '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs'
infile = sys.argv[1]
info_output = subprocess.Popen(['gdalinfo', infile], stdout=subprocess.PIPE).communicate()[0]
size_is_re = re.compile('Size is (?P<width>\d+), (?P<height>\d+)')
size_is = filter(lambda x: x, map(lambda x: size_is_re.match(x), info_output.split('\n')))