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
$ sudo systemctl poweroff | |
Failed to start poweroff.target: Connection timed out | |
$ sudo shutdown -h now | |
Failed to start poweroff.target: Activation of org.freedesktop.systemd1 timed out | |
Failed to open /dev/initctl: No such device or address | |
Failed to talk to init daemon. |
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
BUY WARFAMA 20120327 1.52 18.57923 2595257 lastprice=1.67 targetprice=1.35 quantity>=569.80 | |
BUY TRAKCJA 20120323 1.21 18.40000 7787679 lastprice=1.16 targetprice=.94 quantity>=818.32 | |
BUY DSS 20120322 4.62 18.39286 1250754 lastprice=3.70 targetprice=3.01 quantity>=255.55 | |
BUY ABMSOLID 20120330 3.20 18.36735 3341862 lastprice=3.14 targetprice=2.56 quantity>=300.48 | |
BUY BIOTON 20120329 0.10 18.18182 1713404 lastprice=0.09 targetprice=.07 quantity>=10989.00 | |
BUY CIECH 20120320 16.45 12.26667 6342807 lastprice=16.65 targetprice=14.60 quantity>=52.68 | |
BUY SKOTAN 20120319 3.03 11.38462 5863662 lastprice=3.57 targetprice=3.16 quantity>=243.42 | |
BUY OVOSTAR 20120328 111.90 10 1003295 lastprice=109.20 targetprice=98.28 quantity>=7.82 | |
BUY MIDAS 20120321 0.90 8.33333 11032438 last |
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
+----------------+---------------+---------------+---------------+ | |
| Performance of Scottrade_50209607, 2012-04-02T00:24:33+02:00 | | |
+----------------+---------------+---------------+---------------+ | |
|group |Unrealized |Realized |Combined | | |
+----------------+---------------+---------------+---------------+ | |
| openValueSum | 2347.31 | 3056.22 | 1865.23 | | |
| closeValueSum | 2365.24 | 3132.37 | 1883.16 | | |
| gainLossRaw | 17.93 | 76.15 | 94.08 | | |
| profitSum | 17.93 | 76.15 | 94.08 | | |
| gainLossPerc | 0.76 | 2.49 | 5.04 | |
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
module Psych | |
module Visitors | |
class ToRuby < Psych::Visitors::Visitor | |
def deserialize o | |
if klass = Psych.load_tags[o.tag] | |
instance = klass.allocate | |
if instance.respond_to?(:init_with) | |
coder = Psych::Coder.new(o.tag) | |
coder.scalar = o.value |
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
jQuery("body").find('img').each(function(i,img) { | |
var w = img.width; | |
var h = img.height; | |
if (w && h) { | |
var src = 'http://placekitten.com/'+w+'/'+h; | |
img.src = src; | |
} | |
}); | |
// code from https://github.com/lsemel/jquery-placekitten |
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
require 'rubygems' | |
require 'sqlite3' | |
require 'rexml/document' | |
include REXML | |
xml =<<XML | |
<records> | |
<entry><name>abc</name><qty>3</qty></entry> | |
<entry><name>def</name><qty>5</qty></entry> | |
<entry><name>ghi</name><qty>2</qty></entry> |
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== | |
// @author Crend King | |
// @contributor Franz Alex Gaisie-Essilfie | |
// @version 2.4.20170620 | |
// @name Textarea Backup with expiry Fix | |
// @namespace http://users.soe.ucsc.edu/~kjin | |
// @description Fix @grant https://greasyfork.org/zh-CN/forum/discussion/8161 | |
// @description Retains text entered into textareas and contentEditables, and expires after certain time span. | |
// @include http://* | |
// @include https://* |
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 | |
//To be added under Twig/Node/Switch.php | |
/* | |
* This file is part of Twig. | |
* | |
* (c) 2009 Fabien Potencier | |
* (c) 2009 Armin Ronacher | |
* |
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
hash = { 'foo' => 'bar' } | |
# Version 1 | |
hash = Hash[hash.map { |k, v| [k.to_sym, v] }] | |
# Version 2 | |
hash = hash.reduce({}) do |memo, (k, v)| | |
memo.tap { |m| m[k.to_sym] = v } | |
end |
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
# This file extends the Kernel's require function and adds the | |
# AutoReload module which allows to reload files once they have changed | |
# on the disk. | |
# | |
# Basically, you just require your files as usual, and if you want to update | |
# the files, either call AutoReload.reload(file) or AutoReload.reload_all. | |
# | |
# Usage: | |
# irb -rautoload | |
# |
OlderNewer