Skip to content

Instantly share code, notes, and snippets.

View m0er's full-sized avatar

최윤석 m0er

View GitHub Profile
@DazWorrall
DazWorrall / Output
Created February 9, 2012 13:06
Testing file upload handling in Flask
in upload handler
in file close
..
----------------------------------------------------------------------
Ran 2 tests in 0.021s
OK
@rietta
rietta / random_hash.sh
Created September 5, 2012 17:01
Easy command line random hash generator for Mac OS X, Linux, and FreeBSD.
#!/bin/sh
head -n 4096 /dev/urandom | openssl sha1
@polotek
polotek / ember_hurdles.md
Last active March 30, 2017 05:37
Hurdles getting started with Ember.js

This is a brain dump of my experience trying to get something going with Ember.js. My goal was to get to know the ins and outs of the framework by completing a pretty well defined task that I had lots of domain knowledge about. In this case reproducing a simple Yammer feed. As of this time, I have not been able to complete that task. So this is a subjective rundown of the things I think make it difficult to get a handle on Ember. NOTE: My comments are addressing the Ember team and giving suggestions on what they could do to improve the situation.

App setup

The new guides have pretty good explanation of the various parts of the framework; routers, models, templates, views. But it's not clear how they all get strapped together to make something that works. There are snippets of examples all over the place like:

App.Router.map(function() {
  match('/home').to('home');
});
@cbeams
cbeams / links.md
Last active January 28, 2019 18:02
Links from "Spring Framework 3.2 – Themes and Trends" webinar on January 16th, 2013
@JakeWharton
JakeWharton / BindingAdapter.java
Last active July 25, 2023 05:49
An adapter base class that uses a new/bind pattern for its views.
// Apache 2.0 licensed.
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
/** An implementation of {@link BaseAdapter} which uses the new/bind pattern for its views. */
public abstract class BindableAdapter<T> extends BaseAdapter {
@mlouro
mlouro / gulpfile.js
Last active June 21, 2022 23:20
gulpfile.js with browserify, jshint, libsass, browserSync for livereload, image optimization and system notifications on errors
'use strict';
var gulp = require('gulp');
var gutil = require('gulp-util');
var del = require('del');
var uglify = require('gulp-uglify');
var gulpif = require('gulp-if');
var exec = require('child_process').exec;
var notify = require('gulp-notify');
@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)
@saadfarooq
saadfarooq / android_replace_in_manifest.gradle
Last active March 1, 2024 15:47
Gradle function to replace a placeholder string in AndroidManifest.xml with productFlavor package name
replaceInManifest = {variant, fromString, toString ->
def flavor = variant.productFlavors.get(0)
def buildtype = variant.buildType
def manifestFile = "$buildDir/manifests/${flavor.name}/${buildtype.name}/AndroidManifest.xml"
def updatedContent = new File(manifestFile).getText('UTF-8').replaceAll(fromString, toString)
new File(manifestFile).write(updatedContent, 'UTF-8')
}
@iPaulPro
iPaulPro / include_list_viewpager.xml
Last active March 7, 2024 11:13
CollapsingToolbarLayout with TabLayout
<?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
~
~ Unless required by applicable law or agreed to in writing, software
@lopspower
lopspower / README.md
Last active April 30, 2024 02:11
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store