Skip to content

Instantly share code, notes, and snippets.

View vinz243's full-sized avatar

vinz243 vinz243

  • France
View GitHub Profile
@cketti
cketti / android-27-sources.md
Created December 18, 2017 04:07
Build your own android-27 sources

Build "Sources for Android 27" so you can comfortably browse the Android API source in Android Studio.

  1. Collect source files
mkdir android-sdk-source-build
cd android-sdk-source-build

mkdir -p frameworks/base
@nickbutcher
nickbutcher / 1 search_bar.xml
Last active March 26, 2022 10:03
Demonstrating morphing a search icon into a search field. To do this we use an AnimatedVectorDrawable (https://developer.android.com/reference/android/graphics/drawable/AnimatedVectorDrawable.html) made up of two paths. The first is the search icon (as a single line) the second is the horizontal bar. We then animate the 'trimPathStart' property …
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
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
@maleeb
maleeb / fileservice.js
Last active October 16, 2016 01:03
AngularJS file service for ionic (org.apache.cordova.file)
//Filesystem (checkDir, createDir, checkFile, creatFile, removeFile, writeFile, readeFile)
.factory('FileService', function($q) {
return {
checkDir: function (dir) {
var deferred = $q.defer();
getFilesystem().then(
function(filesystem) {
filesystem.root.getDirectory(dir, {create: false},
@maggiben
maggiben / humanize.js
Last active October 21, 2018 11:35
Human Readable Numbers (AngularJS filter)
angular.module('humanize', [])
.filter('humanize', function(){
return function humanize(number) {
if(number < 1000) {
return number;
}
var si = ['K', 'M', 'G', 'T', 'P', 'H'];
var exp = Math.floor(Math.log(number) / Math.log(1000));
var result = number / Math.pow(1000, exp);
result = (result % 1 > (1 / Math.pow(1000, exp - 1))) ? result.toFixed(2) : result.toFixed(0);
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@nullivex
nullivex / README.md
Last active February 8, 2022 19:57
Windows 7 64bit, NodeJS 32bit, MongoDB, Mongoose, Bcrypt, SocketIO, Canvas, Git

Windows NodeJS Stack

This took me several hours to figure out so I figured it was worth writing down.

Hopefully this step by step can be used to get node running locally without a lot of problems that are commonly ran into.

Downloads

Update July 7th 2014 - Updated most of the versions including not pointing to the heartbleed version of OpenSSL

@cobyism
cobyism / gh-pages-deploy.md
Last active June 26, 2024 04:31
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@naholyr
naholyr / _service.md
Created December 13, 2012 09:39
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)