- Download http://scripts.irssi.org/scripts/cap_sasl.pl and paste it to
~/.irssi/scripts/
- Symlink and add to autorun
$ mkdir autorun; cd autorun; ln -s ../cap_sasl.pl
- Open up irssi
$ irssi
- Run the following commands
/script load autorun/cap_sasl.pl
/sasl set <chatnet> <nick> <password> plain
and/sasl save
- You can replace
plain
withexternal
,ECDSA-NIST256P-CHALLENGE
, orDH-BLOWFISH
. See https://freenode.net/sasl/sasl-irssi.shtml - There are list of common servers already
config
ed. List includes Freenode, OFTC, etc.. See~/.irssi/config
for the list - Edit
~/.irssi/config
to addautoconnect = "yes"
insideservers
array afterport = "6667"
:) (in a different tab?) - Add channels to autoconnect. Sample:
/channel add -auto #channel ChatNet
. For more information about this, see https://irssi.org/documentation/startup/#server-and-channel-automation . This also contains more advanced details about botmasks and botcmds.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function compile(string $brainfuck, $debug = false): array | |
{ | |
$program = []; | |
$pointer = 0; | |
$ip = 0; | |
$prog_length = strlen($brainfuck); | |
$loopStack = []; | |
while (true) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:12.04 | |
MAINTAINER [email protected] | |
# Add Repo for PHP 5.4 Support | |
RUN echo "deb http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu precise main " > /etc/apt/sources.list.d/ondrej.list && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E5267A6C | |
# Install php-5.4 and build essentials | |
RUN apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive apt-get -qqy install \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateRandom(_threshold){ | |
var threshold = _threshold || 0.5; | |
returnArray = []; | |
holdArray = []; | |
for(var i = 1; i<=200; i++) { | |
holdArray = []; //init | |
for(var j = 1; j<=6; j++) { | |
if(Math.random() >= threshold){ | |
if(howmanyInArray(holdArray, "odd") >= 3) { | |
holdArray.push("even"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url = "https://mozilla-nepal.org/translation-helper-pootle/translate.php?string="; | |
document.onclick = function (e) { | |
var elem, evt = e ? e:event; | |
if (evt.srcElement) elem = evt.srcElement; | |
else if (evt.target) elem = evt.target; | |
if(elem.nodeName == "INPUT" || elem.nodeName == "TEXTAREA") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------------------ | |
~/codes/foss-np/anubad(branch:master) » git pull 0 - cparch@cparch | |
Already up-to-date. | |
------------------------------------------------------------ | |
~/codes/foss-np/anubad(branch:master) » ./configure 0 - cparch@cparch | |
./src/mysettings.conf | |
--2015-10-28 19:55:47-- https://github.com/foss-np/np-l10n-glossary/archive/current.tar.gz | |
Resolving github.com (github.com)... 192.30.252.130 | |
Connecting to github.com (github.com)|192.30.252.130|:443... connected. | |
HTTP request sent, awaiting response... 302 Found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.findResultsByFreeText = function(req, res, next, freeText) { | |
//TODO: Check if request contains facet params, and filter accordingly | |
req.results = []; //Array | |
getListOfTeams(req.user.username).then(function(results) { | |
promise_map(function(result){ | |
//console.log("a"); | |
elasticsearch_client.search({ | |
index: result.teamUnique + "_team", | |
type: result.username, | |
body: { |
This is a list of examples and articles, in roughly the order you should follow them, to show and explain how promises work and why you should use them. I'll probably add more things to this list over time.
This list primarily focuses on Bluebird, but the basic functionality should also work in ES6 Promises, and some examples are included on how to replicate Bluebird functionality with ES6 promises. You should still use Bluebird where possible, though - they are faster, less error-prone, and have more utilities.
I'm available for tutoring and code review :)
You may reuse all gists for any purpose under the WTFPL / CC0 (whichever you prefer).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INCFLAGS = -I /usr/include/GL | |
INCFLAGS += -I /mit/6.837/public/include/vecmath | |
LINKFLAGS = -lglut -lGL -lGLU | |
LINKFLAGS += -L /mit/6.837/public/lib -lvecmath | |
CFLAGS = -O2 | |
CC = g++ | |
SRCS = main.cpp | |
OBJS = $(SRCS:.cpp=.o) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from __future__ import print_function | |
class Vertex: | |
def __init__(self, label, value=None): | |
self.label = label |
NewerOlder