Skip to content

Instantly share code, notes, and snippets.

View limkhashing's full-sized avatar
:octocat:
When there is a challenge, there is an opportunity

Lim Kha Shing limkhashing

:octocat:
When there is a challenge, there is an opportunity
View GitHub Profile
@drequeary
drequeary / newTabBackgroundSingle.css
Last active July 17, 2025 23:13
Changes new tab background for Firefox.
@-moz-document url("about:newtab"), url("about:home"), url(about:privatebrowsing) {
/* Sets background image and autoscale image to browser window. */
body{
background-image: url("") !important;
background-size: cover !important;
background-repeat: no-repeat !important;
background-attachment: fixed !important;
background-position-x: center !important;
background-position-y: bottom !important;
}
@yamgarcia
yamgarcia / move.ps1
Last active October 28, 2025 15:23
Auto Mouse Mover - AntiscreenSaver
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class Mouse {
[DllImport("user32.dll")]
public static extern bool SetCursorPos(int x, int y);
}
"@
function Start-AntiscreenSaver {
@djleeds
djleeds / ExampleFlowWithPropertyDelegate.kt
Last active October 27, 2023 23:52
Simple example demonstrating how you might be able to use a delegated property with a flow in Kotlin, in response to a comment on YouTube here: https://www.youtube.com/watch?v=KFgb6l1PUJI&lc=Ugy1TJWi4MwXZOtTGOF4AaABAg. Warning - I'm not very experienced with Flow at this point, so there might be a better way to do this!
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import kotlin.properties.ReadOnlyProperty
import kotlin.reflect.KProperty

Estimation

This document is an attempt to pin down all the things you don't think about when quoting for a project, and hopefully provide a starting point for some kind of framework to make quoting, working and delivering small-medium jobs more predictable and less stressful.

Contents

@szepeviktor
szepeviktor / Wistia-download-videos.md
Last active October 27, 2025 16:56
Download Wistia videos - Please do not misuse it!

Download Wistia videos

  1. right-click on the playing video, select Copy link
  2. find Wistia video ID in the copied link e.g. wvideo=tra6gsm6rl
    • alternative: look for e.g. hashedId=tra6gsm6rl in the page source
  3. load http://fast.wistia.net/embed/iframe/ + video ID in your browser
  4. look for "type":"original" in the page source and copy the URL from the next line e.g. "url":"http://embed.wistia.com/deliveries/129720d1762175bcd8e06dcab926ec76ad38ff00.bin"
  • alternative: look for "type":"hd_mp4_video"
{
"meta": {
"theme": "professional",
"lastModified": "2025-04-04T06:59:24.305Z"
},
"basics": {
"name": "Thomas Davis",
"phone": "0411021021",
"label": "Web Developer",
"image": "https://avatars0.githubusercontent.com/u/416209?s=460&u=38f220a2c9c658141804f881c334c594eb1642ac&v=4",
@luismts
luismts / GitCommitBestPractices.md
Last active October 28, 2025 12:36
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@XinyueZ
XinyueZ / compare_drawable_bitmap.kt
Last active March 19, 2025 11:06
Compare drawable or bitmap content
// Usage:
// drawable1.bytesEqualTo(drawable2)
// drawable1.pixelsEqualTo(drawable2)
// bitmap1.bytesEqualTo(bitmap1)
// bitmap1.pixelsEqualTo(bitmap2)
fun <T : Drawable> T.bytesEqualTo(t: T?) = toBitmap().bytesEqualTo(t?.toBitmap(), true)
fun <T : Drawable> T.pixelsEqualTo(t: T?) = toBitmap().pixelsEqualTo(t?.toBitmap(), true)