Skip to content

Instantly share code, notes, and snippets.

@rojenzaman
rojenzaman / url-shortener.sh
Created July 15, 2020 19:30
Static Url Shortener
#!/bin/bash
if [ "$#" -lt 2 ]; then
echo "./`basename $0` <write url here> <write your site directory here> [second] [\"title\"] [\"html code or txt\"]";
exit 1;
fi
url=$1
directory=$2
if [ "$#" -gt 1 ]; then
const MY_DOMAIN = 'rezaarkan.com';
const SLUG_TO_PAGE = {
'': '882cd6dd6e1e482d823b464f326213e5',
'now': '25b7df64071d420d8f609bf76d9f4114',
'portfolio': '6000547bed0d441793bfba1498c063e2',
'resume': '0934b80d2d1544f99dedadb00be9d146',
'recommendations': '29115129efa44f1a870f390dd2c0a6c0',
'photos': 'e78c0492a5ec486aa51f4cdb2c6f4603',
'blog': '29bb193c1a104ba2b832788b57d58cd6',
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@DigiMancer3D
DigiMancer3D / Preasearch Card Generator
Created July 9, 2020 03:58
Everyone Loves Presearch so generate your presearch digital card. Screenshot and share/print!
<meta name="viewport" content="width=device-width, initial-scale=0.5">
<!-- this is designed to work with itty.bitty.site for a proper output, visit https://itty.bitty.site and input this code pen href.location -->
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<!doctype html>
<html>
<head>
<script src="https://cdn.linearicons.com/free/1.0.0/svgembedder.min.js"></script>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
@EssenceSentry
EssenceSentry / _.sh
Last active September 11, 2020 01:32
Download github README.md
for i in $(cat urls); do j="${i%/master/README.md}"; wget -O "${j##*/}.md" "$i"; done
# urls:
# https://raw.githubusercontent.com/tugstugi/dl-colab-notebooks/master/README.md
# https://raw.githubusercontent.com/jantic/DeOldify/master/README.md
@gh-gmn
gh-gmn / getciq.sh
Last active January 24, 2025 13:43
get ciq sources
#!/bin/sh
# github really really doesn't like me having links in here, so have generated them dynamically
# this script downloads repos of public Garmin Connect IQ source code for Garmin devices to help developers
while read host user repo
do
[ $host = bb ] && url=https://bitbucket.org
[ $host = gh ] && url=https://github.com
[ $host = gl ] && url=https://gitlab.com
url="$url/$user/$repo"
dir="$host-$user-$repo"
@ahidalgob
ahidalgob / Notion_embeds.js
Last active November 12, 2020 02:35
Makes embeds work :)
// ==UserScript==
// @name Notion embeds
// @namespace http://tampermonkey.net/
// @version 0.1
// @description make embeds better :)
// @author ahidalgob
// @match https://www.notion.so/*
// @grant none
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==
@image72
image72 / svg-foreignObject.html
Created June 11, 2020 07:20
svg foreignObject
<!DOCTYPE html>
<html>
<body>
<p>SVG as per Finkle</p>
<p style="color: red;" > WARNING: NoScript barfs a hairball about it being click-jacking when you click on links inside the iframe</p>
<svg width="960" height="850">
<g transform="translate(300, 0) rotate(20)">
<foreignObject x="10" y="10" width="800" height="800">
<body xmlns="http://www.w3.org/1999/xhtml">
<iframe src="http://starkravingfinkle.org/blog" style="width:700px;height:700px"></iframe>
@ianhoffman
ianhoffman / api_example.js
Last active February 16, 2021 22:34
Example of a frontend API client
// var songInfo = {
// songName: ''
// lyric: '',
// }
//
// A pseudo-genre is the artist and their related artists.
//
function getArtist(searchString) {
// Make API call to get the artist from the search string