Skip to content

Instantly share code, notes, and snippets.

View karbassi's full-sized avatar
🌱

Ali Karbassi karbassi

🌱
View GitHub Profile
@karbassi
karbassi / Git gpg stuck.md
Created February 5, 2020 15:26
If your git process gets stuck during the `gpg` signing phase, you can restart `gpg` by running

If your git process gets stuck during the gpg signing phase, you can restart gpg by running

gpgconf --kill gpg-agent
@karbassi
karbassi / README.md
Last active February 28, 2024 20:56
Archive all messages in Google Messages web app

Archive all messages in Google Messages web app

This code was something I quickly put together to archive over 5000 text messages in Google Messages. I have no idea if Google frowns on this or not, but it's basically the same as if a human sat there and archived all the messages by hand.

Tested and working as of Monday, November 4, 2019.

How to run

  1. Sign into https://messages.google.com/web/
  2. Open Chrome Developers console by going to View > Developer > JavaScript Console.
  3. Copy and paste the code below into console. It should automatically run.
@karbassi
karbassi / reset.css
Created March 27, 2013 17:08
Modified reset.css to include useful changes from normalize.css
/* http://meyerweb.com/eric/tools/css/reset/
v2.0-modified | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@karbassi
karbassi / Instructions.md
Created June 25, 2012 16:57
Create a ZIP file from an SVN url

Installing

  • Download svn-zip into /usr/local/bin/. For example: curl https://raw.github.com/gist/2989864/svn-zip > /usr/local/bin/svn-zip
  • Make sure that /usr/local/bin/ is in your PATH.

Usage

In your terminal, use:

svn-zip SVN_URL ZIP_FILE_NAME

@karbassi
karbassi / index.html
Created October 21, 2010 22:02
How to handle single and double click events separately in javascript.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Single and Double Click</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="the_div"></div>
<span>Double click the block</span>
@karbassi
karbassi / curlies.js
Created August 12, 2013 23:49
Really small native javascript function to convert text with straight quotes to curly/smart quotes.
function curlies(element) {
function smarten(text) {
return text
/* opening singles */
.replace(/(^|[-\u2014\s(\["])'/g, "$1\u2018")
/* closing singles & apostrophes */
.replace(/'/g, "\u2019")
/* opening doubles */
@karbassi
karbassi / README.md
Created May 1, 2023 15:04
Create Animated GIFs from Images with FFmpeg Using a Bash Script

Creating a GIF from a series of images is a simple process with the right tools. This bash script simplifies the process using FFmpeg, a popular multimedia tool for handling multimedia data.

How to use the script

Here's how to use the script:

./create-gif.sh <path-to-images> [pattern] [output] [fps]
name: Publish Website to GitHub Pages
on:
push:
branches:
- master
- main
jobs:
build-deploy:
#Just pure awesomeness!
bind '"\e[A"':history-search-backward
bind '"\e[B"':history-search-forward
bind Space:magic-space
# Misc -------------------------------------------------------------
# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+:}ignoredups:erasedups
@karbassi
karbassi / screen.cheat.sheet.txt
Created April 16, 2012 20:32
Screen Cheat Sheet
.-----------------------------------------------------------------------.
| |
| Screen VT100/ANSI Terminal Emulator |
| Default Keyboard Shortcut |
| Cheat Sheet |
| |
'-----------------------------------------------------------------------'
| Peteris Krumins (peter@catonmat.net), 2007.09.21 |
| http://www.catonmat.net - good coders code, great reuse |
'-----------------------------------------------------------------------'