Skip to content

Instantly share code, notes, and snippets.

View desiderantes's full-sized avatar
🥟
Empanadas

Mario Daniel Ruiz Saavedra desiderantes

🥟
Empanadas
View GitHub Profile
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active June 16, 2024 13:44
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@Chaser324
Chaser324 / GitHub-Forking.md
Last active July 22, 2024 14:45
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

public class ClipboardManager : Object {
private static Gtk.Clipboard monitor_clipboard;
public delegate void MonitorFn();
public static void attach_monitor_selection(MonitorFn fn) {
monitor_clipboard = Gtk.Clipboard.get_for_display (Gdk.Display.get_default (),
Gdk.SELECTION_PRIMARY);
monitor_clipboard.owner_change.connect ((ev) => {
stdout.printf("%s\n", ev.get_event_type ().to_string());
stdout.flush ();
@wassname
wassname / permutations.js
Last active June 28, 2022 22:53
Combinatorics permutatons and product in javascript using lodash.js (like python's itertools)
/**
* Lodash mixins for combinatorics
* by: wassname & visangela
* url: https://gist.github.com/wassname/a882ac3981c8e18d2556/edit
* lodash contrib issue: https://github.com/node4good/lodash-contrib/issues/47
* lic: same as lodash
* Inspired by python itertools: https://docs.python.org/2.7/library/itertools.html
*
* Usage:
* permutations([0,1,2],2) // [[0,1],[0,2],[1,0],[1,2],[2,0],[2,1]]
#elC - The elementary OS Combobulator - There are many issues within the community that tend to come up a lot.
#I know many of them are open bug reports, but until they are patched we can provide a consolidated list of work-arounds.
#I think this will be helpful for newcomers and veterans alike
#enable ppas
sudo apt install -y software-properties-common python3-software-properties python-software-properties
#install elementary tweaks
sudo add-apt-repository -y ppa:philip.scott/elementary-tweaks
sudo apt update -y
@IanColdwater
IanColdwater / twittermute.txt
Last active July 2, 2024 02:25
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet