This file contains hidden or 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
| class SeachMixin(): | |
| def _fillSeach(whatSeach): | |
| self.path.xpath(self.SEACH_XPATH).text = whatSeach | |
| def _clickButton(): | |
| self.path.xpath(self.SEACH_XPATH_BUTTON).click() | |
| def seach(whatSeach): | |
| self._fillSeach(whatSeach) | |
| self._clickButton() |
This file contains hidden or 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
| export default function createWebSocketMiddleware(url) { | |
| var ws | |
| var connected = false | |
| return ({ dispatch }) => (next) => (action) => { | |
| const {type} = action | |
| if (type === "SEND_WS" && connected) { | |
| try { | |
| ws.send(action.payload) | |
| } catch(e) { |
This file contains hidden or 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
| import sublime, sublime_plugin | |
| class ZagRunner(sublime_plugin.WindowCommand): | |
| def run(self, **kwarg): | |
| host_args ={ | |
| "type": "telnet", | |
| "encoding": "utf8", | |
| "host":"192.168.23.1", | |
| "port": 5222, | |
| "syntax": "Packages/Python/Python.tmLanguage" |
This file contains hidden or 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
| [ | |
| { | |
| "keys": ["ctrl+w"], | |
| "command": "run_multiple", | |
| "args": { | |
| "commands": [ | |
| {"command": "find_under_expand", "args": null, "context": "window"}, | |
| {"command": "show_panel", "args": {"panel": "find"}, "context": "window"} | |
| ] | |
| } |
This file contains hidden or 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 | |
| # coding: utf-8 | |
| """ | |
| prompt for status git | |
| """ | |
| import re | |
| import sh | |
| class my_err_out(): | |
| def __init__(self): | |
| self.merr = '' |
This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or 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
| Number::pad = (digits, signed) -> | |
| s = Math.abs(@).toString() | |
| s = "0" + s while s.length < digits | |
| (if @ < 0 then "-" else (if signed then "+" else "")) + s | |
| Date.months = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ] | |
| Date.weekdays = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ] | |
| Date.formats = | |
| "a": -> Date.weekdays[@getDay()].substring(0, 3) |