Skip to content

Instantly share code, notes, and snippets.

View Sloy's full-sized avatar

Rafa Vázquez Sloy

View GitHub Profile
@nicjansma
nicjansma / MountVHD.cmd
Created January 5, 2012 02:28
MountVHD and UnMountVHD: Allows you to mount .VHDs in Windows 7 from the command-line. http://nicj.net/2012/01/04/mounting-vhds-in-windows-7-from-a-command-line-script
@echo off
setlocal enabledelayedexpansion
if {%1}=={} (
echo Usage: %~nx0 [vhd] [letter]
exit /b 1
)
set vhdPath=%~dpnx1
set driveLetter=%2
@ravasthi
ravasthi / _config.yml
Created February 15, 2012 08:59
Multiple authors on Jekyll
authors:
hanzou:
name: Hanzou Hattori
display_name: Hanzou
gravatar: c66919cb194f96c696c1da0c47354a6a
email: hanzou@company.com
web: http://company.com
twitter: company
github: hhattori
jorgen:
@shunchu
shunchu / video-thumbnails-generator.sh
Created November 15, 2012 18:00
Batch generate thumbnails from mp4 files using ffmpg
#!/bin/bash
# setup
FILES=name_of_file_to_match_*.mp4
SEEK_POINT=00:00:30
IMG_FORMAT=png
FRAME_SIZE=150X100
DEST=thumbnails
for f in $FILES
@cyrilmottier
cyrilmottier / CityBikesContract.java
Last active January 12, 2024 18:04
Using the new Gradle-based Android build system: a second example
package com.cyrilmottier.android.citybikes.provider;
import android.net.Uri;
import com.cyrilmottier.android.avelov.BuildConfig;
/**
* @author Cyril Mottier
*/
public class CityBikesContract {
@thombergs
thombergs / build.gradle
Last active October 21, 2020 21:51
Accessing the SVN revision number in a Gradle script
import org.tmatesoft.svn.core.wc.*
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'org.tmatesoft.svnkit', name: 'svnkit', version: '1.7.11'
}
}
@chrisbanes
chrisbanes / FloatLabelLayout.java
Last active March 15, 2024 06:39
FloatLabelLayout
/*
* Copyright 2014 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@falkorichter
falkorichter / build.gradle
Created July 1, 2014 20:37
Android-L gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion "android-L"
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "sensorbeacon.android.sensorberg"
minSdkVersion 'L'
targetSdkVersion 'L'
@fedefernandez
fedefernandez / SignUpActivity.java
Created September 15, 2014 15:35
Abstract ActionBar with Dagger (from Architecting Android Applications with Dagger - Jake Wharton)
public class SignUpActivity extends Activity {
private final ObjectGraph childOg;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState):
ExampleApp app = (ExampleApp) getApplication();
ObjectGraph og = app.getObjectGraph();
@Aracem
Aracem / build.gradle
Created October 13, 2014 09:33
Gradle Example
apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'
apply plugin: 'hugo'
apply plugin: 'crashlytics'
def versionMajor = 1
def versionMinor = 7
def versionPatch = 0
def versionBuild = 0 // bump for dogfood builds, public betas, etc.