Skip to content

Instantly share code, notes, and snippets.

View rohan20's full-sized avatar

Rohan Taneja rohan20

View GitHub Profile
@mbinna
mbinna / podforceupdate.sh
Created December 4, 2012 09:43
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
@kasperpeulen
kasperpeulen / README.md
Last active June 6, 2024 10:54
How to pretty-print JSON using Dart.

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@iChintanSoni
iChintanSoni / SharedPreferenceUtils.java
Last active December 5, 2018 01:52
Utility class for working with SharedPreferences
import android.content.Context;
import android.content.SharedPreferences;
public class SharedPreferenceUtils {
private static SharedPreferenceUtils mSharedPreferenceUtils;
protected Context mContext;
private SharedPreferences mSharedPreferences;
private SharedPreferences.Editor mSharedPreferencesEditor;
private SharedPreferenceUtils(Context context) {
@premithk
premithk / FireBaseRequestHandler.java
Created January 21, 2017 16:02
A request handler for picasso that will handle firebase storage location like this gs://appname.appspot.com/Images/1.JPG
/**
* Created by premith on 21/01/17.
*/
import android.graphics.BitmapFactory;
import android.util.Log;
import com.google.android.gms.tasks.Tasks;
import com.google.firebase.storage.FirebaseStorage;
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 17, 2024 18:30
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@aortbals
aortbals / squash-and-merge-cli.md
Last active January 16, 2024 10:46
Squash and Merge on the Command line

With the introduction of GitHub's Squash and Merge feature, this has become less prevelant, however it's still useful in scenarios where GitHub's interface is unavailable.

Let's talk through two ways to do a squash and merge on the command line.

Take 1: Interactive Rebase

When to use it

  • When you have not merged main into your feature branch
  • There are no merge conflicts
@joseluisq
joseluisq / stash_dropped.md
Last active June 13, 2024 15:13
How to recover a dropped stash in Git?

How to recover a dropped stash in Git?

1. Find the stash commits

git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.

@ilikerobots
ilikerobots / intl_locale_override.dart
Last active December 19, 2019 13:34
Example of overriding default locale for use with intl
import 'dart:async';
import 'package:intl/intl.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:intl_translate_example/l10n/messages_all.dart';
void main() => runApp(new MyApp());
class Translations {
static Future<Translations> load(Locale locale) {