Skip to content

Instantly share code, notes, and snippets.

View cha0s's full-sized avatar
👌
Gettin' it

Ruben R cha0s

👌
Gettin' it
View GitHub Profile
;;
(local $i i32)
(local $j i32)
(local $d i32)
(local $p f32)
(local $v f32)
(local $instance externref)
(local $length i32)
;;
(local.set $i (i32.const 0))
// ==UserScript==
// @name Fuck yummly
// @namespace yummly
// @include https://www.yummly.com/recipe/*
// @version 1
// @grant none
// ==/UserScript==
var loop = true, clicked = 0;
var reactId = null;
// ==UserScript==
// @name World's Laziest FB Cleaner
// @namespace gm.cha0s
// @description Checks if there's suggest post bullshit on your FB feed once a second. Nukes it with prejudice.
// @include https://www.facebook.com/
// @version 1
// @grant none
// ==/UserScript==
(function() {

Reddichat - Markdown - Expando - Image - Resizer

path = require 'path'

exports.pkgmanRegister = (registrar) ->

  registrar.registerHook 'shrubAngularDirective', -> [
    '$compile', '$window'
    ($compile, $window) ->
@cha0s
cha0s / video-containers.user.js
Last active June 13, 2017 09:57
Video containers
// ==UserScript==
// @name Video containers
// @namespace gm.cha0s
// @description Resize video containers
// @include http://www.promptfile.com/*
// @include http://www.movshare.net/video/*
// @include http://movpod.in/*
// @include http://vodlocker.com/*
// @include http://bestreams.net/*
// @include http://www.nowvideo.sx/video/*
@cha0s
cha0s / gist:cc46894e3f1704812f66
Created February 12, 2015 21:54
Reddichat notifications (thanks milcom!)
javascript:(function() { var timeToDisplayNotifInSeconds = 5;var notificationRegistrar = function(){var notify = function(message, callback) {var notification = new Notification(message); callback(notification);};angular.element(document.body).injector().invoke(['$rootScope', 'shrub-socket', 'shrub-ui/notifications', 'shrub-user', function($rootScope, socket, notifications, user) { if (window.notifyMentions) { window.notifyMentions = false; notifications.add({text: 'Notifications for mentions disabled.'}); } else { window.notifyMentions = true; socket.on('reddichat.chat.message', function(message) {if(message.text.search(user.instance().name) > -1) {notify(message. from + ": " + message.text, function(notification){setTimeout(function(){notification.close();}, timeToDisplayNotifInSeconds * 1000);});} }); notifications.add({text: 'Notifications for mentions enabled.'}); } $rootScope.$digest(); }]);};var registerNotificationsIfPermitted = function(c
javascript:(function() {
var timeToDisplayNotifInSeconds = 5;
var notificationRegistrar = function(){
var notify = function(message, callback) {
var notification = new Notification(message);
callback(notification);
};
javascript:(function() { angular.element(document.body).injector().invoke(['$rootScope', 'shrub-socket', 'shrub-ui/notifications', function($rootScope, socket, notifications) { if (window.playMessageSound) { window.playMessageSound = false; notifications.add({text: 'Message sound disabled'}); } else { window.playMessageSound = true; if (!window.messageSound) { window.messageSound = document.createElement('audio'); window.messageSound.src = 'http://reddichat.com/chat-message.mp3'; socket.on('reddichat.chat.message', function() { if (window.playMessageSound) window.messageSound.play(); }); } notifications.add({text: 'Message sound enabled'}); } $rootScope.$digest(); }]); })();
@cha0s
cha0s / gist:cf07a59f689101d8298f
Last active August 29, 2015 14:15
Reddichat sound hax :3
angular.element(document.body).injector().invoke(['$rootScope', 'shrub-socket', 'shrub-ui/notifications', function($rootScope, socket, notifications) {
if (window.playMessageSound) {
window.playMessageSound = false;
notifications.add({text: 'Message sound disabled'});
}
else {
window.playMessageSound = true;
$module.service 'title', [
'$timeout'
($timeout) ->
# Certain things will want to make the window/tab title flash for attention.
# Those things will use this API to do so.
_flashUpWrapper = (text) -> "¯¯¯#{text.toUpperCase()}¯¯¯"
_flashDownWrapper = (text) -> "___#{text}___"