Skip to content

Instantly share code, notes, and snippets.

View lesssummer's full-sized avatar
🏠
Working from home

Less Sugar lesssummer

🏠
Working from home
View GitHub Profile
@iaindooley
iaindooley / snap_cards_into_position
Created December 1, 2018 03:14
Snap cards into position
function snapBack(notification)
{
var notif = new Notification(notification);
if(notif.member().notTrellinator())
{
notif.movedCard().label("Snap");
notif.movedCard().moveToList(notif.listBefore(),"top");
}
}
@jrr6
jrr6 / ClassroomWorkCard.user.js
Last active May 21, 2021 13:23
A userscript that adds a card showing undone work to the Google Classroom Classes page.
// ==UserScript==
// @name Classroom Work Card
// @version 0.1.8
// @description Adds a card showing undone work to the Google Classroom Classes page.
// @author jrr6
// @downloadURL https://gist.github.com/jrr6/5f7961a3e3a1b582fae94a92ee712250/raw/ClassroomWorkCard.user.js
// @updateURL https://gist.github.com/jrr6/5f7961a3e3a1b582fae94a92ee712250/raw/ClassroomWorkCard.user.js
// @match https://classroom.google.com/*
// @grant GM_addStyle
// ==/UserScript==

Language tips

Try to be mindful of your words in written communications. Here are some tricks to leaving a good impression with written words online.

Avoid "do" and "don't"

When writing imperative sentences, try not to start your sentences with "don't." Try the word "avoid" instead.

  • ⚠️ "Don't use big words."
    This imperative command can make the reader feel like they have no choice on the matter. It implies that the decision lies solely on you, which implies that you don't want to listen to their feedback.
@zaydek-old
zaydek-old / bookmark.min.js
Last active May 28, 2024 19:18
A *simple* CSS debugger. To use, bookmark "Debug CSS" at https://zaydek.github.io/debug.css. Learn more here https://medium.freecodecamp.org/88529aa5a6a3 and https://youtu.be/2QdzahteCCs?t=1m25s (starts at 1:25)
/* debug.css | MIT License | zaydek.github.com/debug.css */ if (!("is_debugging" in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(g):not(path) { color: hsla(210, 100%, 100%, 0.9) !important; background: hsla(210, 100%, 50%, 0.5) !important; outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; filter: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger();
@bazuzu931
bazuzu931 / jekyll category and post loop
Last active April 25, 2018 01:58
jekyll category and post loop
{% assign sorted_cats = site.categories | sort %}
{% for category in sorted_cats %}
<!-- <p><a href="posts/{{ category | first }}">{{ category | first }}</a></p> -->
<p><a href="post.html">{{ category | first }}</a></p>
{% for posts in category %}
{% for post in posts %}
<li><a href="{{site.baseurl}}{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
{% endfor %}
{% endfor %}
@SKempin
SKempin / Git Subtree basics.md
Last active December 28, 2025 14:59
Git Subtree basics

Git Subtree Basics

If you hate git submodule, then you may want to give git subtree a try.

Background

When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.

When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.

Adding a subtree

Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:

@odan
odan / php-oracle.md
Last active May 30, 2024 21:28
XAMPP - Oracle Driver Setup (v12)
@konstantin-morenko
konstantin-morenko / list-categories-count.liquid
Last active January 21, 2021 14:49 — forked from Phlow/list-categories-count.liquid
Jekyll: List all categories with according post count and show and link all post items listed in the according category
<h2>Categories</h2>
<ul>
{% assign categories_list = site.categories %}
{% if categories_list.first[0] == null %}
{% for category in categories_list %}
<li><a href="#{{ category }}">{{ category | capitalize }} ({{ site.tags[category].size }})</a></li>
{% endfor %}
{% else %}
{% for category in categories_list %}
<li><a href="#{{ tag[0] }}">{{ category[0] | capitalize }} ({{ category[1].size }})</a></li>
@DanRader
DanRader / jekyll-category.html
Last active December 6, 2018 01:09
Jekyll—Color code categories controlled by front matter & a 'categories' collection.
---
title: Foo
date: 2016-12-17 11:09:00 -05:00
color: "#A96BE3"
---
@hiddentribe
hiddentribe / appsScript_ListFilesFolders_Mesgarpour.js
Created November 14, 2016 14:46 — forked from mesgarpour/appsScript_ListFilesFolders_ver.2.js
[Google Apps Script] List all files & folders in a Google Drive folder, & write into a speadsheet
/**
* Google Apps Script - List all files & folders in a Google Drive folder, & write into a speadsheet.
* - Main function 1: List all folders
* - Main function 2: List all files & folders
*
* Hint: Set your folder ID first! You may copy the folder ID from the browser's address field.
* The folder ID is everything after the 'folders/' portion of the URL.
*
* @version 1.0
* @see https://github.com/mesgarpour