Skip to content

Instantly share code, notes, and snippets.

@mogsdad
mogsdad / digest.js
Last active October 29, 2021 03:28
This Google Apps Script function returns a string representing the 16-byte MD5 digest of a given message. It was originally written as an answer to StackOverflow question http://stackoverflow.com/questions/16216868/get-back-a-string-representation-from-computedigestalgorithm-value-byte. It's been refactored to support adaptation to other digest …
/**
* Return string representation of MD5 digest of the given message.
*
* @param {String} message Message to be encoded.
*
* @return {String} 16-byte digest value
*/
function signMd5(message){
return digest(Utilities.DigestAlgorithm.MD5, message);
}
@aras-p
aras-p / preprocessor_fun.h
Last active July 16, 2024 02:50
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@Jogan
Jogan / FloatingActionButton.java
Last active December 4, 2023 12:48
Implementation of Android L's floating action button pattern. API 14+
package your_package;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
@Thrilleratplay
Thrilleratplay / arch-linux-install.md
Last active March 10, 2024 22:39 — forked from mattiaslundberg/arch-linux-install
Installing Arch Linux on an LUKS Encrpyted root and booting from UEFI
@maruta
maruta / AdaFruitSSD1351.cs
Created June 16, 2015 05:09
netduino driver for the color 128x128 OLED display referenced SSD1351
using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
namespace Maruta
{
/// <summary>
/// This class is a driver for the color 128x128 OLED display referenced SSD1351.
/// http://www.adafruit.com/products/1431
private int parentClassType() {
if (1 == 2)
{
return PARENT_MY_SCHEDULE_ACTIVITY;
} else
{
return PARENT_MY_SCHEDULE_ACTIVITY;
}
@joepie91
joepie91 / vpn.md
Last active July 15, 2024 17:09
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@vancluever
vancluever / gnome-tracker-disable.md
Last active May 2, 2024 16:26
GNOME Tracker Disable

Disabling GNOME Tracker and Other Info

GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here: http://lduros.net/posts/tracker-sucks-thanks-tracker/

After discovering it chowing 2 cores, I decided to go about disabling it.

Directories

@brandondurham
brandondurham / styles.less
Last active June 24, 2024 14:48
Using Operator Mono in Atom
/**
* Using Operator Mono in Atom
*
* 1. Open up Atom Preferences.
* 2. Click the “Open Config Folder” button.
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up.
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden!
* 5. Tweak away.
*
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png):
@benjaminjackman
benjaminjackman / README
Last active October 26, 2019 10:09
Instructions on how to open Unity3d scripts in Rider on Ubuntu
#Simple instructions for using Unity3d with project rider on Ubuntu
#1. Download and install latest .deb for Unity3d from:
http://forum.unity3d.com/threads/unity-on-linux-release-notes-and-known-issues.350256/
#2. Download and install the Project Rider EAP (not sure if publicly available but you
can sign up for early access here: https://www.jetbrains.com/rider/
#3. Open the Unity3d (.deb installs the executable at /opt/Unity/Editor/Unity )