Skip to content

Instantly share code, notes, and snippets.

View p32929's full-sized avatar

Fayaz Bin Salam p32929

View GitHub Profile
@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
@passsy
passsy / material text sizes.md
Last active May 25, 2023 04:24
Material font sizes
@dropmeaword
dropmeaword / browser_history.md
Last active November 7, 2024 16:02
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.

@davebrny
davebrny / tiny clipboard.ahk
Last active August 22, 2024 05: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
@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())
@bmaupin
bmaupin / free-database-hosting.md
Last active November 15, 2024 05:28
Free database hosting
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active November 14, 2024 12:14
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 !

@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> {
@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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.