Skip to content

Instantly share code, notes, and snippets.

View pottekkat's full-sized avatar
🥽
Available

Navendu Pottekkat pottekkat

🥽
Available
View GitHub Profile
@liyasthomas
liyasthomas / GitHub stats count Scriptable widget script.md
Last active January 18, 2024 06:36
GitHub stats count Scriptable widget script

To use this script, simply replace the USERNAME, REPOSITORY, GITHUB_STARS_REPO and GITHUB_DOWNLOADS_REPO placeholders with the appropriate values for the GitHub repository you want to fetch the star and release download count for. Then, copy the complete script into a new Scriptable App script and run it. The star and release download count for the specified repository will be displayed in a Scriptable widget.

// Constants for widget configuration
const WIDGET_TITLE = "GitHub";
const USERNAME = "hoppscotch"
const REPOSITORY = "hoppscotch"
const GITHUB_STARS_REPO = "hoppscotch/hoppscotch";
const GITHUB_DOWNLOADS_REPO = "hoppscotch/releases";
const CACHED_DATA_HOURS = 0.5;
@acarril
acarril / bootable-win-on-mac.md
Created November 18, 2022 17:49
Create a bootable Windows USB using macOS

For some reason, it is surprisingly hard to create a bootable Windows USB using macOS. These are my steps for doing so, which have worked for me in macOS Monterey (12.6.1) for Windows 10 and 11. After following these steps, you should have a bootable Windows USB drive.

1. Download a Windows disc image (i.e. ISO file)

You can download Windows 10 or Windows 11 directly from Microsoft.

2. Identify your USB drive

After plugging the drive to your machine, identify the name of the USB device using diskutil list, which should return an output like the one below. In my case, the correct disk name is disk2.

@fintanr
fintanr / dublin.md
Last active September 10, 2022 14:29
Quick Guide to Dublin Pubs

Pubs

All of these pubs are within 20 minutes walk of each other in the city center. Its a subjective list, everyone has their own preferences in Dublin. The common thread is these pubs tend not to have music or TVs. All added to this map.

  • Mulligans, Poolbeg St - this is probably my favourite pub in Dublin, its a little off the beaten track but it features in Joyces Ulysses.
  • Stags Head - just across Dame Street from the Temple Bar area, a wonderful old style Victorian pub.
  • Peters Pub - one of the smallest, but most professional, pubs in the city, on South William Street near Grafton St.
  • Nearys - just off Grafton Street, another Victorian pub, downstairs is lovely.
  • Kehoes - just off Grafton Street, can get very busy.
@zjeaton
zjeaton / _Google Analytics 4 with Hugo.md
Last active October 13, 2025 15:18
Google Analytics 4 (with Measurement ID) in Hugo

Google Analytics 4 in Hugo

Blog post with slightly more detail can be found here. If you want to just get to it, read on.

I (very) recently decided to reimplement GA in my site, and found that existing implementation in Hugo was not compatible with GA4's new Measurement ID. This is an easy way to drop your Measurement ID into your site. I'm not going to go into how to sign up for GA.

This implementation requires that you create a site parameter for analytics, create a partial, and call the partial. I tweaked the names of the parameters and files so they didn't collide with the built-in hugo code.

Place the GoogleAnalyicsID (Measurement ID) in config.toml within [params].

@sagar-viradiya
sagar-viradiya / activity_main.xml
Last active August 17, 2021 17:55
DevFest India 2020 Day 1 - Main Acitvity UI
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/backgroundColor"
tools:context=".MainActivity">
<androidx.core.widget.ContentLoadingProgressBar
@sagar-viradiya
sagar-viradiya / colors.xml
Last active October 18, 2020 17:40
DevFest India 2020 Day 1 - colors.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#B30000</color>
<color name="colorPrimaryDark">#980304</color>
<color name="colorAccent">#9EBE95</color>
<color name="white">#FFFFFF</color>
<color name="black">#000000</color>
<color name="backgroundColor">#EDEEEE</color>
</resources>
@sagar-viradiya
sagar-viradiya / build.gradle
Last active January 3, 2024 22:47
DevFest India 2020 Day 1 - build.gradle file
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: "kotlin-kapt"
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.devfest.india.bmsclone"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active October 28, 2025 06:41
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@squarism
squarism / iterm2.md
Last active November 11, 2025 19:25
An iTerm2 Cheatsheet

In the below keyboard shortcuts, I use the capital letters for reading clarity but this does not imply shift, if shift is needed, I will say shift. So + D does not mean hold shift. + Shift + D does of course.

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key