Skip to content

Instantly share code, notes, and snippets.

View alouanemed's full-sized avatar
:octocat:
FOCUS

Mohamed Alouane alouanemed

:octocat:
FOCUS
View GitHub Profile
@hvisser
hvisser / DemoModeEnabler.kt
Created January 23, 2018 11:44
Enables demo mode on a device for the purpose of taking screenshots
class DemoModeEnabler {
fun enable() {
executeShellCommand("settings put global sysui_demo_allowed 1")
sendCommand("exit")
sendCommand("enter")
sendCommand("notifications", "visible" to "false")
sendCommand("network", "wifi" to "hide")
sendCommand("battery", "level" to "100", "plugged" to "false")
sendCommand("clock", "hhmm" to "1000")
@guiliredu
guiliredu / facebook-page-invite.js
Last active March 15, 2024 15:33
Facebook - Script to auto invite people who liked a page post do like the page
var buttons;
buttons = document.getElementsByClassName('_42ft');
for (var i = 0; i < buttons.length; i++) {
if(buttons[i].getAttribute('ajaxify') != null){
if(buttons[i].getAttribute('ajaxify').indexOf('invite') != -1){
buttons[i].click();
}
}
}
@chrisbanes
chrisbanes / CollapsingTitleLayout.java
Last active March 26, 2023 11:58
CollapsingTitleLayout
/*
* Copyright 2014 Chris Banes
*
* 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
@gabrielemariotti
gabrielemariotti / Readme.md
Last active March 2, 2024 23:10
A SimpleSectionedRecyclerViewAdapter: use this class to realize a simple sectioned `RecyclerView.Adapter`.

You can use this class to realize a simple sectioned RecyclerView.Adapter without changing your code.

The RecyclerView should use a LinearLayoutManager. You can use this code also with the TwoWayView with the ListLayoutManager (https://github.com/lucasr/twoway-view)

This is a porting of the class SimpleSectionedListAdapter provided by Google

Screen

Example: