Skip to content

Instantly share code, notes, and snippets.

View p32929's full-sized avatar

Fayaz Bin Salam p32929

View GitHub Profile
@VonHeikemen
VonHeikemen / simple.lua
Last active July 6, 2023 15:59
a simple neovim config you can use as init.lua
-- ========================================================================== --
-- == EDITOR SETTINGS == --
-- ========================================================================== --
local set = vim.opt
set.hidden = true
set.swapfile = false
set.backup = false
set.hlsearch = false
@prasannaboppe
prasannaboppe / ComputationFuture.java
Created February 21, 2020 06:00
Wrapping an asynchronous computation into a synchronous (blocking) computation.
import org.jetbrains.annotations.NotNull;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
public class ComputationFuture<T> implements Future<T> {
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active April 23, 2024 08:02
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@bmaupin
bmaupin / free-database-hosting.md
Last active April 23, 2024 23:31
Free database hosting
@bolot
bolot / PeekingLinearLayoutManager.kt
Last active August 30, 2023 07:19
LinearLayoutManager subclass that "peeks", shows a portion of the adjacent child views.
class PeekingLinearLayoutManager : LinearLayoutManager {
@Suppress("Unused")
@JvmOverloads
constructor(context: Context?, @RecyclerView.Orientation orientation: Int = RecyclerView.VERTICAL, reverseLayout: Boolean = false) : super(context, orientation, reverseLayout)
@Suppress("Unused")
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
override fun generateDefaultLayoutParams() =
scaledLayoutParams(super.generateDefaultLayoutParams())
@davebrny
davebrny / tiny clipboard.ahk
Last active July 27, 2023 16:24
📋 (autohotkey) - microscopic clipboard manager (text only)
#noEnv
#singleInstance, force
history := []
history_total = 20
truncate = 65
return ; end of auto-execute
$^c:: ; add to clipboard history
@dropmeaword
dropmeaword / browser_history.md
Last active April 5, 2024 17:37
Playing around with Chrome's history

Browser histories

Unless you are using Safari on OSX, most browsers will have some kind of free plugin that you can use to export the browser's history. So that's probably the easiest way. The harder way, which seems to be what Safari wants is a bit more hacky but it will also work for other browsers. Turns out that most of them, including Safari, have their history saved in some kind of sqlite database file somewhere in your home directory.

The OSX Finder cheats a little bit and doesn't show us all the files that actually exist on our drive. It tries to protect us from ourselves by hiding some system and application-specific files. You can work around this by either using the terminal (my preferred method) or by using the Cmd+Shft+G in Finder.

Finder

Once you locate the file containing the browser's history, copy it to make a backup just in case we screw up.

@passsy
passsy / material text sizes.md
Last active May 25, 2023 04:24
Material font sizes
@4rc0s
4rc0s / SimpleKeyboardHistory.ahk
Created November 7, 2011 16:37
AutoHotKey clipboard history script that is easily navigated and relatively short
; Retrieves saved clipboard information since when this script last ran
Loop C:\tmp\clipvar*.txt
{
clipindex += 1
FileRead clipvar%A_Index%, %A_LoopFileFullPath%
FileDelete %A_LoopFileFullPath%
}
maxindex := clipindex
OnExit ExitSub