Skip to content

Instantly share code, notes, and snippets.

View NeuronQ's full-sized avatar
🎯
Focusing

Andrei Anton NeuronQ

🎯
Focusing
View GitHub Profile
import System.IO.Unsafe
data CWorld = CWorld {
cin :: String,
cout :: String
}
newtype CWIO a = CWIO { unCWIO :: CWorld -> (a, CWorld) }
@NeuronQ
NeuronQ / gist:840b2d90090623f60339
Created August 17, 2014 07:05
code butterfly angular 1
/**
* @license AngularJS v1.3.0-beta.18
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, document, undefined) {'use strict';
/**
* @description
*
/**
* Parses an escaped url query string into key-value pairs.
* @returns {Object.<string,boolean|Array>}
*/
function parseKeyValubue(/**string*/keyValue) {
var obj = {}, key_value, key;
forEach((keyValue || "").split('&'), function(keyValue) {
if ( keyValue ) {
key_value = keyValue.replace(/\+/g,'%20').split('=');
key = tryDecodeURIComponent(key_value[0]);
<?php
$ip = '2001:df0:1e::';
$ip2 = '2001:df0:1f::';
$prefix_len = 48;
/**
* dtr_pton
*
@NeuronQ
NeuronQ / tabletest.md
Last active August 29, 2015 14:25
testing table
Col1 Col2
× one
* two
* two
@NeuronQ
NeuronQ / polymer-50-shades-of-dom.html
Last active August 29, 2015 14:25
Polymer's Fifty Shades of DOM
<!--
HOWTO do kinky stuff with Polymer and jQuery
Read this is you went through https://www.polymer-project.org/1.0/docs/devguide/local-dom.html
and you're still not sure how to play with jQuery inside Polymer components.
-->
<link rel="import" href="/components/polymer/polymer.html">
<dom-module id="my-component">
@NeuronQ
NeuronQ / macking_packing_story.md
Last active August 29, 2015 14:26
Mapping vs. Packing vs. Story thinking
Thinking in Maps Thinking in Packages Thinking in Stories
Use it for solving hard problems absorbing new information fast, when "deep" understanding is not needed explaining stuff
exploring new problems or even new domains having easily communicable information at hand selling
out-of-the-box non-linear reasoning giving easy to follow instructions convincing
making sense of LARGE amounts of highly distilled information first-phase of learning something new, if speed matters more than deeper understanding manipulating people
learning new and complicated stuff small volumes of information
exploring an un-familiar domain un-distilled information that needs to be conveyed in i
{
"digital goods": {
"keywords": "",
"subcats": {
"Software": {
"keywords": "Software, Software Downloads, Tax Software, TurboTax, Microsoft Office, Security Software, Antivirus Software, Operating Systems, Windows 7, Windows 8, Windows, Photo Editing, Symantec, Norton, Linux"
}
}
},
"physical goods": {
@NeuronQ
NeuronQ / bash-powerline.sh
Last active August 28, 2016 13:52
My custom version of bash-powerline - ultra-lightweight custom bash prompt with git info
#!/usr/bin/env bash
__powerline() {
# Unicode symbols
readonly PS_SYMBOL_DARWIN=''
readonly PS_SYMBOL_LINUX='$'
readonly PS_SYMBOL_OTHER='%'
readonly GIT_BRANCH_SYMBOL='⑂ '
readonly GIT_BRANCH_CHANGED_SYMBOL='+'
@NeuronQ
NeuronQ / ssh-agent-autostart.sh
Created June 20, 2016 04:30
ssh-agent autostart (bash) - add this to .bashrc
SSH_ENV="$HOME/.ssh/environment"
function start_agent {
echo "Initialising new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo succeeded
chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
/usr/bin/ssh-add;
}