Skip to content

Instantly share code, notes, and snippets.

View xiprox's full-sized avatar

İhsan Işık xiprox

View GitHub Profile
@alexfacciorusso
alexfacciorusso / KtRetrofit.kt
Last active September 12, 2019 12:05
Retrofit Kotlin extensions
import retrofit.Call
import retrofit.Callback
import retrofit.Response
import retrofit.Retrofit
/**
* @author Alex Facciorusso
* @since 06/11/15
*/
@UweTrottmann
UweTrottmann / GridInsetDecoration.java
Last active December 9, 2023 14:43
RecyclerView grid spacing decoration for use with GridLayoutManager.
/*
* Copyright 2015 Uwe Trottmann
*
* 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
@theMikeD
theMikeD / Make Ready Folder.jsx
Created February 14, 2015 18:37
Photoshop script to create a folder if it doesn't already exist
#target photoshop
// Mini-Script to create a folder if it doesn't already exist.
// This one requires editing by the end user.
// (c) Mike Dickson www.photoshoptools.ca
// Licensed under the GPL
// You will need to edit this location for your own uses
var f = new Folder("~/Desktop/sRGB Blog Images");
if ( ! f.exists ) {
@bjorgvino
bjorgvino / yosemite ntfs read+write.txt
Last active December 2, 2021 03:58
osxfuse + ntfs-3g + Yosemite = NTFS R/W
Remove osxfuse if installed via homebrew:
> brew uninstall osxfuse
Install osxfuse binary and choose to install the MacFUSE compatibility layer:
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files
Reboot (optional but recommended by osxfuse)
Install ntfs-3g via homebrew:
> brew update && brew install ntfs-3g
@shakalaca
shakalaca / gist:4942cfb8a4869325cdc9
Last active November 6, 2019 07:29
Howto: compile mkbootimg/mkbootfs/make_ext4fs on OS X
mkdir source
mkdir bin
# clone source
cd source
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/external/libselinux
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/system/core
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/external/zlib
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/system/extras
@alexfu
alexfu / DividerItemDecoration.java
Last active February 9, 2023 05:09
An ItemDecoration that draws dividers between items. Pulled from Android support demos.
/*
* Copyright (C) 2014 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
@JMPergar
JMPergar / FlipPageViewTransformer.java
Last active November 7, 2019 05:33
Flip animation for ViewPager
import android.support.v4.view.ViewPager;
import android.view.View;
public class FlipPageViewTransformer implements ViewPager.PageTransformer {
@Override
public void transformPage(View page, float position) {
float percentage = 1 - Math.abs(position);
page.setCameraDistance(12000);
setVisibility(page, position);
setTranslation(page);
@kzim44
kzim44 / Iso8601.java
Created May 6, 2014 17:29
Class to parse ISO8601 dates for Android apps.
/**
* Helper class for handling ISO 8601 strings of the following format:
* "2008-03-01T13:00:00+01:00". It also supports parsing the "Z" timezone.
*/
public final class Iso8601 {
/** Transform Calendar to ISO 8601 string. */
public static String fromCalendar(final Calendar calendar) {
Date date = calendar.getTime();
String formatted = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
.format(date);
@jvns
jvns / interview-questions.md
Last active April 25, 2024 15:52
A list of questions you could ask while interviewing

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

@BrandonSmith
BrandonSmith / AndroidManifest.xml
Last active July 19, 2023 19:11
Quick example of how to schedule a notification in the future using AlarmManager
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cards.notification">
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"