Skip to content

Instantly share code, notes, and snippets.

@gre
gre / easing.js
Last active October 30, 2024 16:49
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@JeanSebTr
JeanSebTr / gists.js
Last active February 5, 2018 17:15
Async load of Github's gists without jquery in 31 lines of code
document.getElementsByClassName && (function(){
var _URL = /(https?:\/\/gist.github.com\/[^?#]+)(\?file=([a-z0-9_.-]+))?/i;
var gists = document.getElementsByClassName('gist');
function embed(url, i, tag) {
window['embed_gist_'+i] = function(gist) {
var tmp = document.createElement('div');
tmp.innerHTML = gist.div;
tag.parentNode.replaceChild(tmp.firstChild, tag);
var css = document.getElementsByClassName('gist_css');
for(var i=0; i<css.length; i++) {
@ofekp
ofekp / bluetoothctl.py
Last active January 24, 2023 10:12 — forked from egorf/bluetoothctl.py
Bluetoothctl wrapper in Python
# ReachView code is placed under the GPL license.
# Written by Egor Fedorov ([email protected])
# Copyright (c) 2015, Emlid Limited
# All rights reserved.
# If you are interested in using ReachView code as a part of a
# closed source project, please contact Emlid Limited ([email protected]).
# This file is part of ReachView.
@IntergalacticApps
IntergalacticApps / make_windows10_great_again.bat
Last active August 25, 2024 15:23
Make Windows 10 Great Again - stop Windows 10 spying!
@echo off
setlocal EnableDelayedExpansion
ver | find "10." > nul
if errorlevel 1 (
echo Your Windows version is not Windows 10... yet. Brace yourself, Windows 10 is coming^^!
pause
exit
)
@hadrianw
hadrianw / shebang.c
Last active November 13, 2022 21:30
Make a C file executable with those few lines.
#if 0
set -e; [ "$0" -nt "$0.bin" ] &&
gcc -Wall -Wextra -pedantic -std=c99 "$0" -o "$0.bin"
exec "$0.bin" "$@"
#endif
#include <stdio.h>
int
main(int argc, char *argv[]) {
@Mygod
Mygod / export-ble-infos.py
Last active November 14, 2024 14:54
Export your Windows Bluetooth LE keys into Linux!
#!/usr/bin/python3
"""
Copyright 2021 Mygod
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0