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
/* | |
Polyfill for the Object.watch/Object.unwatch functions available in Mozilla browsers | |
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/watch | |
you have a test here: | |
http://www.telecable.es/personales/covam1/deployToNenyures/SourceCode/Object.watch.test.js | |
and can read more here: | |
http://deploytonenyures.blogspot.com.es/2013/02/objectwatch-polyfill.html | |
*/ |
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
// ==UserScript== | |
// @name RTL Slack | |
// @namespace slask.com | |
// @include https://*.slack.com/* | |
// @version 1.2.2 | |
// @grant none | |
// ==/UserScript== | |
function isRTL(text) { | |
if (text !== "") { |
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
:root { | |
--background-color: #fff; | |
--page-width: 70em; | |
--primary-color: #151513; | |
--font-color: #151513; | |
--subtle-primary-color: #151513; | |
--block-background-color: #f1f3f4; | |
--menu-item-color: #000; | |
--menu-item-hover-color: #000; | |
--menu-item-alert-bg: #ffffff; |
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
"""Hackish script to convert a notebook into | |
Note that the content of markdown cells is not translated: it is assumed to | |
hold asciidoc content instead (even if it does not render correctly in the | |
browser editing the notebook file). | |
This script could be improved to use pandoc to handle the conversion instead. | |
Sample usage: |
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 https://gist.github.com/MattDMo/6cb1dfbe8a124e1ca5af | |
import os | |
import json | |
import socket | |
import threading | |
activate_this = os.environ.get("SUBLIMEREPL_ACTIVATE_THIS", None) | |
# turn off pager |
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/env bash | |
# | |
# Script to change underscan/overscan value of a monitor on OS-X. | |
# © 2016-2019 Konstantin Gredeskoul, distributed under the MIT License. | |
# | |
#——————————————————————————————————————————————————————————————————————————————————————————— | |
# EXCEPT AS REPRESENTED IN THIS AGREEMENT, ALL WORK PRODUCT BY DEVELOPER IS PROVIDED "AS IS". | |
# OTHER THAN AS PROVIDED IN THIS AGREEMENT, DEVELOPER MAKES NO OTHER WARRANTIES, EXPRESS OR | |
# IMPLIED, AND HEREBY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING ANY WARRANTY OF | |
# MERCHANTABILITY AND WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. |
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
cat data.csv | awk -F',' '{print " SET \""$1"\" \""$2"\" \n"}' | redis-cli --pipe |
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
"""Asynchronous requests in Flask with gevent""" | |
from time import time | |
from flask import Flask, Response | |
from gevent.pywsgi import WSGIServer | |
from gevent import monkey | |
import requests |
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 | |
ignore_user_abort(true); | |
function syscall ($cmd, $cwd) { | |
$descriptorspec = array( | |
1 => array('pipe', 'w'), // stdout is a pipe that the child will write to | |
2 => array('pipe', 'w') // stderr |
OlderNewer