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
| Bundler could not find compatible versions for gem "jquery-rails": | |
| In Gemfile: | |
| spree (>= 0) ruby depends on | |
| jquery-rails (~> 2.1.4) ruby | |
| jquery-rails (2.2.0) |
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
| first create a new Zone called World and add any country to it | |
| then fire up your ruby console and do: | |
| Spree::Country.find_each { |country| Spree::ZoneMember.create! zone_id: Spree::Zone.where(:name => "World").first.id, zoneable_id: country.id, zoneable_type: "Spree::Country" } |
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 httplib2 | |
| import re | |
| cadpat = re.compile('Daily.*?<td> ([0-9.]+) \(CAD\)', re.DOTALL) | |
| dogepat = re.compile('DOGE/BTC<div.*?>\(last: ([0-9.]+)\)</') | |
| def get_html(url): | |
| _, html = httplib2.Http(disable_ssl_certificate_validation=True).request(url) | |
| return html |
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
| # -*- coding: utf-8 -*- | |
| import httplib2 | |
| import re | |
| cadpat = re.compile('Daily.*?<td> ([0-9.]+) \(CAD\)', re.DOTALL) | |
| usdpat = re.compile('"btc_to_usd":"([0-9.]+?)"') | |
| dogepat = re.compile('"lasttradeprice":"([0-9.]+?)"') | |
| def get_html(url): | |
| _, html = httplib2.Http(disable_ssl_certificate_validation=True).request(url) |
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
| // Bind F7 to 'step' | |
| javascript:$(document).bind('keydown', function(e) { e.which == 118 && parse('s'); }); void(0) | |
| // Add a 'readhex' command that works just like 'read' but dumps nothing but the hex | |
| javascript:cpu._readhex = | |
| function(e) { | |
| if (!e[1]) return write(" Please give an expression to read the memory at."), void 0; | |
| var t = cpu.to_addr(e[1]); | |
| cpu.get("/cpu/dbg/memory/" + t + "?len=" + (parseInt(e[2], 16) + (15 - parseInt(e[2], 16) & 15) || 32), function(e) { | |
| for (var n = atob(e.raw), i = "", o = " ", s = 0; s < n.length; s++) s % 2 == 0 && (o += " "), o += pad(n.charCodeAt(s).toString(16), 2), s % 8 == 7 && (i += " " + o + "\n", o = " "); |
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
| private static void rangeCheck(int arrayLen, int fromIndex, int toIndex { | |
| if (fromIndex > toIndex) | |
| throw new IllegalArgumentException("fromIndex(" + fromIndex + | |
| ") > toIndex(" + toIndex+")"); | |
| if (fromIndex < 0) | |
| throw new ArrayIndexOutOfBoundsException(fromIndex); | |
| if (toIndex > arrayLen) | |
| throw new ArrayIndexOutOfBoundsException(toIndex); | |
| } |
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
| wget --no-check-certificate --post-data="---- BEGIN PRIVATE KEY ----\r\ntrololololololololol\r\n---- END PRIVATE KEY ----" https://www.cloudflarechallenge.com |
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
| for FILE in `ls *AVI | sort` ; do | |
| avidemux --nogui --output-format MP4 --video-codec x264 --audio-codec aac --load "$FILE" --save ${FILE%.*}.mp4 --quit | |
| done |
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
| file=`mktemp` | |
| echo "Average power of channel $1:" | |
| for i in {1..10}; | |
| do kalibrate-hackrf/src/kal -s GSM850 -c $1 2>&1 | sed -n 's/.*power: \([0-9.]*\)/\1/p' >> $file; | |
| done | |
| awk '{ total += $1; count++ } END { print total/count }' $file | |
| rm $file |
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
| // Install the Greasemonkey extension for Firefox or the Tampermonkey extension for Chrome | |
| // then click the Raw button ---> | |
| // ==UserScript== | |
| // @name hide freep login | |
| // @namespace xorrbit | |
| // @include http://*.winnipegfreepress.com/* | |
| // @version v5 | |
| // @grant none | |
| // ==/UserScript== |