Skip to content

Instantly share code, notes, and snippets.

Yusuph Wickama wickerlabs

Block or report user

Report or block wickerlabs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wickerlabs
wickerlabs / listener.sh
Last active Dec 5, 2018
Used to download links with a specific keyword from a link.
View listener.sh
#!/bin/bash
url="downloads.wickerlabs.com"
if [[ $(http "https://$url" | grep -i -c "$1") -eq 0 ]]; then
echo "[+] Not found, skipping downloading."
else
echo "[+] Starting downloading"
link="https://$url/$(http https://downloads.wickerlabs.com | sed -n 's/.*href="\([^"]*\).*/\1/p' | grep -i "$1" )"
echo "Link: $link"
@wickerlabs
wickerlabs / Logger.java
Created Dec 5, 2018
A logger that works only when the app is in debug mode.
View Logger.java
import android.util.Log;
public class Logger {
private static final String TAG = "LOGGER";
public static void debug(String msg) {
if (BuildConfig.DEBUG) {
Log.d(TAG, "[+] ".concat(msg));
}
@wickerlabs
wickerlabs / endless_list.java
Last active Dec 5, 2018
Load more items on a list view when scrolling to the bottom.
View endless_list.java
boolean isLoading = false;
listView.setOnScrollListener(new AbsListView.OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView absListView, int scrollState) {
if (listAdapter != null &&
scrollState == SCROLL_STATE_IDLE &&
listView.getLastVisiblePosition() == (listView.getCount() - 1) &&
!isLoading && (listAdapter.getCount() != itemsProvider.getTotal())) {
@wickerlabs
wickerlabs / TZPhoneNumberUtils.java
Last active Dec 5, 2018
This is a class that can be used to Validate phone numbers in Tanzania based on a telecomm network, or if it fits the standard phone number format. It can also accept unformated number and return one that fits the format.
View TZPhoneNumberUtils.java
/*
* Copyright (c) 2018, Yusuph Wickama (WickerLabs). All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
You can’t perform that action at this time.