Skip to content

Instantly share code, notes, and snippets.

View kvithayathil's full-sized avatar

Kurian Vithayathil kvithayathil

View GitHub Profile
@keithrbennett
keithrbennett / chg-screenshot-filenames
Created February 18, 2024 13:49
Renames Mac screenshot files using a more command line friendly format.
#!/usr/bin/env python3
# This script reads the filespecs in the current directory, collects names of files
# in the default screenshot file name format, converts the names to lower case
# with spaces converted to hyphens, and removes the "at" to produce a command line friendly filespec;
# for example, "Screenshot 2024-02-18 at 21.06.31.pdf" becomes "screenshot-2024-02-18--21.06.31.pdf".
#
# It ignores but preserves the extensions, so if you have changed the screenshot file type with, e.g.:
# defaults write com.apple.screencapture type pdf && killall SystemUIServer
# then it will rename those PDF files too.
@threepointone
threepointone / eggs.md
Last active June 16, 2024 18:23
Sunil's Gochujang eggs

Sunil's Eggs.

These are my eggs. I like this recipe because it's delicious, doesn't take too much time to make, and goes well with other meals in my life.

All instructions are negotiable, adjust based on vibes.

Start by slicing up an onion. I like using a milder tasting onion, or a banana shallot. I like slices so I can taste it in the final product, but feel free to chop it finer if you'd like.

In a bowl, make the 'sauce'. A teaspoon each of gochugang paste, soy sauce, sesame oil, a couple of pinches of brown sugar, mirin or rice vinegar (I prefer mirin because it doesn't smell as strong, but the vinegar is more 'traditional'). Also add a teaspoon of garlic paste, and a teaspoon of ginger paste.

@taskylizard
taskylizard / fmhy.md
Last active July 2, 2024 17:02
/r/freemediaheckyeah, in one single file (view raw)
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active July 1, 2024 07:27
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@mrk-han
mrk-han / movie-to-gif.md
Last active October 7, 2023 11:54
Convert (Screen Capture) .mov files to GIF format using Ffmpeg and Gifsicle. Put GIFs into JIRA and Slack with ease! MacOS

Convert (Screen Capture) .mov files to GIF format using Ffmpeg and Gifsicle (MacOS)

Prompts for path to .mov and allows user to enter a .gif name. Then converts that .mov file to a .gif and saves to ~/Downloads/.

Inspired by: https://gist.github.com/dergachev/4627207

To use:

  • Save the code from this gist into a file and name it something like convert_movie_to_gif.sh, and then run chmod +x ./convert_movie_to_gif.sh to make it executable.
    • If gifsicle isn't installed, the script will tell you.
@Farious
Farious / rollback_aab.sh
Last active June 13, 2024 07:39
Script that will use the provided Android App Bundle (.aab) and change its version code and version name to the provided values, avoiding re-building the whole .aab. This enables us to re-submit a previously submited aab to the play store, doing a rollback to the given version.
#!/bin/sh
#
# Script that will use the provided Android App Bundle (.aab) and change its version code and version name to the provided values, avoiding re-building the whole .aab.
# Run this script with: sh rollback.sh your_project.aab android_signing_key.key key_alias key_pwd version_code version_name
#
# Necessary setup:
#
# jarsigner - This binary should exist in the path
#
# Configuration.proto and Resources.proto can be found in aapt2's github
@Alexisvt
Alexisvt / .zshrc
Created July 4, 2019 17:33
.zshrc configuration file configured to work with Android and Flutter
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/aleville3/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@jarbro
jarbro / symantec-vip-access-totp.md
Last active July 1, 2024 17:02
Generate Symantec VIP Access Token as TOTP

Generate Symantec VIP Access Token as OTP

Recently I came across a web service that required two-factor authentication using the Symantec VIP Access App. I already manage all of my OTP tokens in a different app (If you are on iOS I highly recommend using OTP Auth by Roland Moers.) and did not want to have to use yet another app to generate the TOTP.

There is a way to generate a Symantec VIP Access compatible token very easily if you have access to an environment which can run Python PIP. I happen to have Ubuntu Windows Subsystem Linux running on my machine. (If you are running Windows 10 and don't have this you should really check it out.) Let's get started...

hello

Instructions

Here we install python3-pip and qrencode so we can generate our secret, I

@Elforama
Elforama / VMInjectionFactory.kt
Last active January 1, 2022 14:58
Android view model factory implementation allowing easy view model constructor injection.
/**
* Usage example:
*
* @Inject
* lateinit var mFactory: VMInjectionFactory<MyViewModel>
*/
class VMInjectionFactory <out Type: ViewModel> @Inject constructor(val vm: Lazy<Type>): ViewModelProvider.Factory {
@Suppress("UNCHECKED_CAST")
override fun <T : ViewModel> create(p0: Class<T>): T {
@zcaceres
zcaceres / Revealing-Module-Pattern.md
Last active June 18, 2024 00:44
Using the Revealing Module Pattern in Javascript

The Revealing Module Pattern in Javascript

Zach Caceres

Javascript does not have the typical 'private' and 'public' specifiers of more traditional object oriented languages like C# or Java. However, you can achieve the same effect through the clever application of Javascript's function-level scoping. The Revealing Module pattern is a design pattern for Javascript applications that elegantly solves this problem.

The central principle of the Revealing Module pattern is that all functionality and variables should be hidden unless deliberately exposed.

Let's imagine we have a music application where a musicPlayer.js file handles much of our user's experience. We need to access some methods, but shouldn't be able to mess with other methods or variables.

Using Function Scope to Create Public and Private Methods