Skip to content

Instantly share code, notes, and snippets.

View lamarqua's full-sized avatar

Adrien lamarqua

  • Montréal, Québec
View GitHub Profile
javascript:(function()%7Bjavascript%3A%20(function()%20%7Bvar%20rejectScriptTextFilter%20%3D%20%7B%20acceptNode%3A%20function(node)%20%7Bif%20(node.parentNode.nodeName%20!%3D%3D%20'SCRIPT')%20%7Breturn%20NodeFilter.FILTER_ACCEPT%3B%7D%7D%7D%3Bvar%20re%20%3D%20%2F10.%5Cd%7B4%2C9%7D%5C%2F%5B-._%3B()%2F%3AA-Z0-9%5D%2B%2Fi%3Bvar%20n%2C%20walk%3Ddocument.createTreeWalker(document.body%2CNodeFilter.SHOW_TEXT%2CrejectScriptTextFilter%2Cfalse)%3Bwhile%20(n%3Dwalk.nextNode())%20%7Bvar%20text%20%3D%20n.wholeText%3Bvar%20found%20%3D%20text.match(re)%3Bif%20(found)%20%7Bwindow.location.href%20%3D%20%22http%3A%2F%2Fsci-hub.st%2F%22%20%2B%20found%3B%7D%7D%7D)()%7D)()
javascript:(function()%7Bvar%20re%20%3D%20%2F10.%5Cd%7B4%2C9%7D%5C%2F%5B-._%3B()%2F%3AA-Z0-9%5D%2B%2Fi%3Bvar%20text%20%3D%20document.documentElement.textContent%20%7C%7C%20document.documentElement.innerText%3Bvar%20found%20%3D%20text.match(re)%3Bif%20(found)%20%7Bwindow.location.href%20%3D%20%22http%3A%2F%2Fsci-hub.tw%2F%22%2B%20found%3B%7D%7D)()
@lamarqua
lamarqua / gui.c
Created October 9, 2017 16:54 — forked from vurtun/gui.c
/* ===========================================================================
*
* LIBRARY
*
* =========================================================================== */
/* Proof of Concept GUI:
* - PoC UI implementation in ~2kLOC of C89 (ANSI C)
* => Core solutions has no external dependencies (removing standard library dependency is trival)
* => Does not use or require any special language constructs or macro constructs just pointers and enums
* - Combines both "retained" and "immediate mode" UI by providing control over update frequency
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
# put this into your Packages/User directory, save as .sublime-syntax file.
name: Literate Haskell (markdown-unlit)
file_extensions:
- lhs
scope: text.html.markdown.haskell
contexts:
main:
@lamarqua
lamarqua / Logic.idr
Created September 10, 2016 12:42 — forked from mbbx6spp/Logic.idr
Propositions *AS* Types: The Cheatsheet (with Fancy Nancy)
module Logic
-- Connective is a fancy word for operator.
namespace Connectives
-- Truth: Also known as the "unit" type, (there is only one truth in value,
-- literally).
-- Scala: type Truth = Unit
-- Haskell: type Truth = ()
Truth : Type

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@lamarqua
lamarqua / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console