Skip to content

Instantly share code, notes, and snippets.

@faizsiddiqui
faizsiddiqui / SimpleTabLayout.java
Last active October 15, 2020 14:30
Android Sliding TabLayout with Icons.
package com.example.simpletablayout;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
@AndyBowes
AndyBowes / Queue.kt
Created August 1, 2017 16:53
Kotlin Queue Implementation
class Queue<T> {
val elements: MutableList<T> = mutableListOf()
fun isEmpty() = elements.isEmpty()
fun count() = elements.size
fun enqueue(item: T) = elements.add(item)
fun dequeue() = if (!isEmpty()) elements.removeAt(0) else null
fun peek() = if (!isEmpty()) elements[0] else null
override fun toString(): String = elements.toString()
}
@lopspower
lopspower / KeyboardUtils.java
Last active July 6, 2023 13:35
Force Hide Keyboard Android
import android.app.Activity;
import android.content.Context;
import android.graphics.Rect;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
public class KeyboardUtils {
public static void hideKeyboard(Activity activity) {
View view = activity.findViewById(android.R.id.content);
@steveclarke
steveclarke / components.js
Created September 26, 2019 12:15
Globally register your custom components in Quasar. Add this file to your /boot dir
// Globally register all base components for convenience, because they
// will be used very frequently. Components are registered using the
// PascalCased version of their file name.
import upperFirst from 'lodash/upperFirst'
import camelCase from 'lodash/camelCase'
export default async ({ Vue }) => {
console.log('loading components')
// https://webpack.js.org/guides/dependency-management/#require-context
@jmervine
jmervine / cert_convert.sh
Created November 17, 2014 21:57
openssl: convert cert from p7b to crt (or cer)
openssl pkcs7 -print_certs -in old.p7b -out new.crt
# openssl pkcs7 -print_certs -in old.p7b -out new.cer
@folt
folt / gist:a98e9368dbe1dcbfce7198c16b862c92
Last active March 11, 2024 10:06
Balsamiq Mockups 3 crack
Name: Flash
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc=
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676
Thank you!