Skip to content

Instantly share code, notes, and snippets.

View waseefakhtar's full-sized avatar
🎯
Focusing

Waseef Akhtar waseefakhtar

🎯
Focusing
View GitHub Profile
@waseefakhtar
waseefakhtar / Terminal output once npm install --production is ran
Created November 4, 2013 18:28
I'm on Mac OS X 10.9. And it's Ghost 0.3.3 and Node 0.10.21 that I installed.
npm http GET https://registry.npmjs.org/moment/2.1.0
npm http GET https://registry.npmjs.org/underscore/1.5.1
npm http GET https://registry.npmjs.org/connect-slashes/0.0.9
npm http GET https://registry.npmjs.org/node-polyglot/0.2.1
npm http GET https://registry.npmjs.org/showdown/0.3.1
npm http GET https://registry.npmjs.org/when/2.2.1
npm http GET https://registry.npmjs.org/knex/0.4.11
npm http GET https://registry.npmjs.org/bookshelf/0.5.7
npm http GET https://registry.npmjs.org/bcrypt-nodejs/0.0.3
npm http GET https://registry.npmjs.org/node-uuid/1.4.0
@waseefakhtar
waseefakhtar / Terminal output once npm start is ran
Created November 11, 2013 17:14
I'm on Mac OS X 10.9. And it's Ghost 0.3.3 and Node 0.10.21 that I installed.
events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:901:11)
at Server._listen2 (net.js:1039:14)
at listen (net.js:1061:10)
at net.js:1135:9
at dns.js:72:18
at process._tickCallback (node.js:415:13)
@waseefakhtar
waseefakhtar / gist:b0f356234727566b1927
Created February 15, 2015 11:23
10 things that most excite me when designing.
Evaluate and iterate existing UI with respect to it's goals
Design the Zapier logotype and logomark
Do print design for t-shirts, notebooks, one-sheets, other swag, etc.
Run a design team (say, 10 designers)
Own the Zapier brand
Extend the brand colors for a new landing page design
Create logos and assets for our partners to use in co-marketing
Travel to work with teammates, speaking gigs, conferences
Design native mobile apps for iOS and Android
Create daily content for social media and/or focus on details of perfect sizes social media use for logo and cover displays
@waseefakhtar
waseefakhtar / java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
Last active January 2, 2020 20:32
Demystifying Android's FragmentTransaction and solving "Can not perform this action after onSaveInstanceState"
java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1341)
at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1352)
at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:595)
at android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:574)
@waseefakhtar
waseefakhtar / fragment_transaction.java
Last active January 2, 2020 21:04
IllegalStateException: Can not perform this action after onSaveInstanceState
private static void showRewardDialog(FragmentActivity fragmentActivity) {
final FragmentManager fragmentManager = fragmentActivity.getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.show(fragmentManager, RewardDialogFragmentKt.FRAGMENT_TAG);
}
@waseefakhtar
waseefakhtar / fragmentTransaction.java
Created January 2, 2020 21:11
IllegalStateException: Can not perform this action after onSaveInstanceState
private static void showNewRewardDialog(FragmentActivity fragmentActivity) {
RewardDialogFragment dialogFragment = RewardDialogFragment.newInstance();
final FragmentManager fragmentManager = fragmentActivity.getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.add(dialogFragment, RewardDialogFragmentKt.FRAGMENT_TAG).commitAllowingStateLoss();
}
implementation 'com.google.android.material:material:1.1.0'
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:minHeight="?attr/actionBarSize"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:titleTextColor="@android:color/white"
<com.google.android.material.navigation.NavigationView
android:id="@+id/navigation_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:clipToPadding="false"
app:menu="@menu/main_menu"
/>
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<group android:checkableBehavior="single">
<item
android:id="@+id/nav_home"
android:icon="@drawable/ic_menu_camera"
android:title="@string/menu_home" />
<item