Skip to content

Instantly share code, notes, and snippets.

@hasssan
hasssan / daily_template.md
Created September 6, 2021 17:38 — forked from hdnl/daily_template.md
Template to faciliate taking daily notes in Markdown, featuring start and end day reflections, schedule, and work log

Start-of-Day Reflections

I am grateful for...

What would make today great?

@hasssan
hasssan / jiraToDendronTaskPage.js
Last active August 9, 2022 05:40 — forked from idelem/titleUrlMarkdownClip.js
Bookmarklet to copy current page title and url in Markdown format to clipboard, like [title](url) or Tasks - Usual for posting links to resources in README.md files
javascript: (function () {
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
/*IE specific code path to prevent textarea being shown while dialog is visible.*/
return clipboardData.setData('Text', text);
} else if (document.queryCommandSupported && document.queryCommandSupported('copy')) {
var textarea = document.createElement('textarea');
textarea.textContent = text;
textarea.style.position = 'fixed';
/* Prevent scrolling to bottom of page in MS Edge.*/
@hasssan
hasssan / generate-ssh-key.sh
Created November 20, 2018 16:32 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@hasssan
hasssan / addlicense.sh
Last active September 12, 2018 09:38 — forked from Elemecca/addlicense.sh
Prepends a license notice to a set of files.
#!/bin/bash
#
# addlicense.sh - prepends a license notice to a set of files
#
# Originally written by Sam Hanes <sam@maltera.com>.
# To the extent possible under law, the author has waived all copyright
# and related or neighboring rights in this work, which was originally
# published in the United States. Attribution is appreciated but not
# required. The complete legal text of the release is available at
# http://creativecommons.org/publicdomain/zero/1.0/
@hasssan
hasssan / index.html
Last active January 6, 2021 13:12 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<meta charset="UTF-8">
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 20px; }
@media (min-width: 768px){
body{ padding-top: 150px; }
}
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
@hasssan
hasssan / key-fingerprint
Last active December 2, 2018 23:18 — forked from yosemitebandit/key-fingerprint
view your ssh public key's fingerprint; compare this to what Github has listed in the ssh key audit
$ ssh-keygen -l -f /path/to/keys/id_rsa.pub
2048 aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99 id_rsa.pub (RSA)
# With newer versions of ssh
# form upstream comment
$ ssh-keygen -l -E md5 -f ~/.ssh/my-github-key.pub
@hasssan
hasssan / gulpfile.js
Last active August 29, 2015 14:15 — forked from insin/gulpfile.js
var gulp = require('gulp')
var shell = require('gulp-shell')
gulp.task('build-docs', shell.task('make html', {cwd: './docs'}))
gulp.task('docs', ['build-docs'], function() {
gulp.watch(['./docs/*.rst', './docs/*.py'], ['build-docs'])
})
# http://stackoverflow.com/questions/10314907/getting-a-list-of-files-in-sass-compass
require File.join(File.dirname(__FILE__), 'listfiles.rb')
@hasssan
hasssan / gist:2026925
Created March 13, 2012 05:03 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@hasssan
hasssan / php.snippets
Created July 12, 2011 10:32 — forked from aaroneaton/php.snippets
CodeIgniter PHP snippets for the VIM plugin SnipMate
# SnipMate is required to use snippets
# Download SnipMate: http://www.vim.org/scripts/script.php?script_id=2540
# Put this file in ~/.vim/snippets/ then restart vim
# This snippet file includes many useful snippets for CodeIgniter. Please feel free to fork and contribute!
snippet php
<?php
${1}
?>
snippet phpil
<?php ${1} ?>