Skip to content

Instantly share code, notes, and snippets.

@lyrixx
lyrixx / HardCoreDebugLogger.php
Last active Aug 18, 2022
Hardcore Debug Logger
View HardCoreDebugLogger.php
<?php
const STREAM_OPEN_FOR_INCLUDE = 128;
final class HardCoreDebugLogger
{
public static function register(string $output = 'php://stdout')
{
register_tick_function(function () use ($output) {
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
@squarism
squarism / iterm2.md
Last active Aug 18, 2022
An iTerm2 Cheatsheet
View iterm2.md

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@diegomarangoni
diegomarangoni / .vimrc
Last active Aug 18, 2022
Golang Vim/Neovim
View .vimrc
"~/.vimrc
"*****************************************************************************
"" install vim-plug
"*****************************************************************************
let vimplug_exists=expand('~/.vim/autoload/plug.vim')
let g:vim_bootstrap_langs='go,html,javascript,typescript'
let g:vim_bootstrap_editor='vim'
@idelem
idelem / titleUrlMarkdownClip.js
Last active Aug 18, 2022 — forked from bradleybossard/titleUrlMarkdownClip.js
Bookmarklet to copy current page title and url in Markdown format to clipboard, like [title](url) - Usual for posting links to resources in README.md files
View titleUrlMarkdownClip.js
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;
@nicktoumpelis
nicktoumpelis / repo-rinse.sh
Created Apr 23, 2014
Cleans and resets a git repo and its submodules
View repo-rinse.sh
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
@pv
pv / splder.py
Created May 2, 2013
Derivative of B-spline in Python
View splder.py
r"""
Show how to compute a derivative spline.
Scipy's splines are represented in terms of the standard B-spline basis
functions. In short, a spline of degree ``k`` is represented in terms of the
knots ``t`` and coefficients ``c`` by:
.. math::
s(x) = \sum_{j=-\infty}^\infty c_{j} B^k_{j}(x)
@MakingCG
MakingCG / VueFileManager.md
Last active Aug 18, 2022
VueFileManager Guide
View VueFileManager.md
@lttlrck
lttlrck / gist:9628955
Created Mar 18, 2014
rename git branch locally and remotely
View gist:9628955
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@ih2502mk
ih2502mk / list.md
Last active Aug 18, 2022
Quantopian Lectures Saved
View list.md
@renestalder
renestalder / README.md
Last active Aug 18, 2022
Unfollow all on Facebook
View README.md

Facebook: Unfollow people and pages

See comments section for more up-to-date versions of the script. The original script is from 2014 and will not work as is.

  1. Open news feed preferences on your Facebook menu (browser)
  2. Click people or pages
  3. Scroll down (or click see more) until your full list is loaded
  4. Run the script in your browser console

Facebook will block this feature for you while you use it, depending on how much entities you try to unfollow. It automatically unblocks in a couple of hours and you will be able to continue.