Skip to content

Instantly share code, notes, and snippets.

View brendan-rius's full-sized avatar

Brendan Rius brendan-rius

View GitHub Profile
@brendan-rius
brendan-rius / experiment-1.py
Created December 28, 2015 11:56
Markov model first ugly experiment
import random
import itertools
import nltk
from terminaltables import AsciiTable
def aff(matrix, voc):
m = matrix.copy()
m = [[word] + row for row, word in zip(m, voc)]
@brendan-rius
brendan-rius / my-modal.js
Last active January 20, 2016 10:15
Draft for semantic ui's modals integration in Ember
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['ui', 'modal'],
didInsertElement () {
let _this = this;
this.$().modal({
// When the modal is hidden, we send an action and update its state
onHide: function () {
import Ember from 'ember';
export default Ember.Controller.extend({
elements: [
{name: "Uranium"},
{name: "Plutonium"},
{name: "Francium"},
{name: "Einstanium"}
],
searchQuery: ''
@brendan-rius
brendan-rius / application.controller.js
Last active February 1, 2016 22:08
intermediateTransitionTo()
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
init() {
this._super();
// alert(this.get('p'));
},
appName: 'Ember Twiddle',
queryParams: ['p']
});
@brendan-rius
brendan-rius / Dockerfile
Created June 13, 2018 22:19
DeamonSet for setting inotify config in each nodein k8s
FROM alpine
COPY configure-node.sh configure-node.sh
CMD ["/bin/sh", "configure-node.sh"]
@brendan-rius
brendan-rius / enableDiscordExperiments.js
Created July 6, 2019 20:28 — forked from MPThLee/enableDiscordExperiments.js
Enable Discord Developer Menus in any environment except mobile app without BetterDiscord using Console.
(() => {
// Extracted from Samogot's LibDiscordInternals for BetterDiscord.
const req = typeof(webpackJsonp) === "function" ? webpackJsonp([], {
'__extra_id__': (module, exports, req) => exports.default = req
}, ['__extra_id__']).default : webpackJsonp.push([[], {
'__extra_id__': (module, exports, req) => module.exports = req
}, [['__extra_id__']]]);
delete req.m['__extra_id__'];
delete req.c['__extra_id__'];
const find = (filter, options = {}) => {