Skip to content

Instantly share code, notes, and snippets.

View icyflame's full-sized avatar

Siddharth Kannan icyflame

View GitHub Profile
@icyflame
icyflame / times.csv
Last active August 30, 2022 12:14
All the solvetimes as recorded in CLI Cube Timer, https://npmjs.org/package/cli-cube-timer
33.59 B' U' L B R B L2 F' U B2 L' F U' F L' U B2 R U2 F 1584613820382
42.49 R' F U' F2 U R' F' L2 F' R2 U F' D2 F2 D' L2 D R' F R 1584613891702
33.01 L B2 L' B' D' F' L D' R D2 F U2 F U R D2 L B2 R' D 1584613955023
19.82 D F U2 L F U' B' R' D F U' L' U B' D2 R F' L2 U' R2 1584614000768
27.21 U' F2 D R' B' R' U' F' L U2 F R B' R2 F U' R2 F2 R2 F2 1584614054753
25.79 R2 F2 L2 B L B2 U2 B R F2 L F' U2 F L2 U2 R D2 L' F2 1584614106825
27.56 D L2 D L' D' R2 U B2 L2 F D B D2 F L U L F L D' 1584614164675
30.72 R B D' R F2 U' L' D2 R' U B R' U' B2 D' F' D' B2 R2 B' 1584614220796
28.41 F' U F2 L2 U2 L' F R B2 U B U' R' F2 R B L' U2 R' U' 1584614290222
29.63 F2 L2 F' U R B2 U2 L' D F2 R2 U2 L' U R D2 B' L F2 L2 1584614345661
@icyflame
icyflame / to_https.sh
Last active February 12, 2022 16:12 — forked from michaelsilver/fix_github_https_repo.sh
Convert all GitHub git remotes to SSH or HTTPS.
#/bin/bash
#-- Script to automatically convert all git remotes to HTTPS from SSH
# Script will change all the git remotes.
# If you didn't intend to do that, run the other script in this repo.
# Original 1: https://gist.github.com/m14t/3056747
# Original 2: https://gist.github.com/chuckbjones/9dc6634fe52e56ba45ac
# Thanks to @m14t, @michaelsilver and @chuckbjones.
ssh_to_https(){
REPO_URL=`git remote -v | grep -m1 "^$1" | sed -Ene's#.*(git@github.com:[^[:space:]]*).*#\1#p'`
@icyflame
icyflame / check-exif-data.sh
Created August 7, 2021 10:24
Check all the files under the current folder to see whether they have EXIF data
#!/bin/bash
find . -type f | sort | while read fn;
do
exiftool "$fn" | grep -i 'date/time original' > /dev/null
if [[ "$?" == "1" ]];
then
echo "| NO EXIF DATA | $fn |"
else
echo "| FOUND EXIF DATA | $fn |"
@icyflame
icyflame / install-mysql-57-on-ubuntu.sh
Created July 31, 2021 13:51
Install MySQL 5.7 on Ubuntu 18.04+. The package has been removed from packages.ubuntu.com, and needs to be
#!/usr/bin/bash
set -xe
wget https://downloads.mysql.com/archives/get/p/23/file/mysql-server_5.7.34-1ubuntu18.04_amd64.deb-bundle.tar
tar xf mysql-server_5.7.34-1ubuntu18.04_amd64.deb-bundle.tar
sudo apt-get install -y libaio1 libtinfo5
sudo apt-get install -y libjson-perl python2.7 libpython2-stdlib libpython2.7-stdlib libpython2.7-minimal python2.7-minimal python python2 python2-minimal
sudo apt install -y libmecab2
@icyflame
icyflame / sample-tree
Created August 21, 2020 23:32
Sample tree written in Org mode’s markup language
‪* Title 1‬
‪** Meeting notes
‪*** Meeting notes: Bob‬
**** 2020-08-01
**** 2020-07-01
$ xdg-mime query default "text/html"
signal-desktop.desktop
$ xdg-mime default firefox.desktop "text/html"
$ xdg-mime query default "text/html"
firefox.desktop
@icyflame
icyflame / times.csv
Last active December 8, 2019 06:02
All the solvetimes as recorded in CLI Cube Timer, https://npmjs.org/package/cli-cube-timer
33.85 R2 B2 U R F' L2 D B R D2 B D' R' B' L' U B R B2 R2
25.56 F R D B2 R2 F2 U' L' U R2 U2 L' U B2 L D2 R2 F R2 F2
27.02 D' B D B D' B2 L' D R2 D L D R' U L' F' R' F2 D' R2
36.17 F2 R' U' R F' D R2 D2 B' U B U' B2 R2 U' R' B' L B' L2
24.93 B2 U2 F U L' D2 B' U2 R B2 D2 B U' L F' D R D F' U'
29.37 U' F' U2 B2 U L2 F' U' B D L' F2 L2 U2 F2 L F L2 D2 L
21.87 U2 R' B D R' B' R' F2 L B' D R' D2 R2 B' L' U B' U' R
26.90 F' R2 U' B' D2 R2 D2 R2 B' U' L D2 R2 F' D R B D B2 L'
25.08 D L U' R2 F L2 B' L' D L B' D' L2 F' R2 B' L B2 D B
26.60 U' B' L U' F2 R2 F U L2 B U2 F' L D2 F2 U' B U' L2 D'
@icyflame
icyflame / benchmark-export-statements.md
Created October 1, 2019 13:36
Find whether multiple export statements, a single export statement or no export statement contributes to the fastest shell loading time

TL; DR

Option Time taken to source zshrc
No Imports 1152ms
Import in a single line 1158ms
Import in multiple export statements 1169ms

Options

@icyflame
icyflame / github-to-circleci-bookmarklet.js
Created September 15, 2019 15:30
A bookmarklet to go from github.com/user/repo to circleci.com/gh/user/repo
javascript:
var url = location.href;
if (url.match(/https:\/\/github.com\//)) {
var baseRemoved = url.replace('https://github.com/', '');
var components = baseRemoved.split('/');
if (components.length >= 2) {
var account = components[0];
var repo = components[1];
var newURL = "https://circleci.com/gh/" + account + "/" + repo;
location.href = newURL;
@icyflame
icyflame / launch-darkly-pre-requisite-graph-generator.sh
Created May 30, 2019 07:40
A bash script to generate a .dot file with the pre-requisite dependency graph of your LaunchDarkly setup
#!/usr/bin/env bash
rm -f flags-output
rm -f dependencies
rm -f flat_json
rm -f output.dot
rm -f tmp
curl -H"Authorization: $LD_API_KEY" https://app.launchdarkly.com/api/v2/flags/default > flags-output