View gist:350fe1713591641b3b42
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
(new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', 'c:/temp/chrome.exe');. c:/temp/chrome.exe /silent /install;rm c:/temp -rec |
View server.js
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
var net = require('net'), | |
sys = require('sys'); | |
var messages = []; | |
var work_in_progress = []; | |
var host = '192.168.175.128'; | |
var port = 8999; | |
var server = net.createServer(function(client_stream) { |
View removecomment.go
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
package main | |
import bufio "bufio" | |
import fmt "fmt" | |
import os "os" | |
func main() { | |
var state = "0" | |
var cache = " " | |
View test.js
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
/** | |
* Auto-generated code below aims at helping you parse | |
* the standard input according to the problem statement. | |
**/ | |
const S = readline(); | |
// Write an answer using console.log() | |
// To debug: console.error('Debug messages...'); | |
console.error(S) |
View getCPS.js
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
var getCPS = function(num) { | |
var text = document.getElementById('rowInfoContent' + num.toString()).innerText.split('\n'); | |
var count = parseInt(text[0].replace(/,/g, '').match(/\s(\d+)\s/)[1]); | |
var production = parseFloat(text[1].replace(/,/g, '').match(/\s([\d,.]+)\s/)[1]); | |
return production/count; | |
} | |
var getPrice = function(num) { | |
return parseInt(document.getElementById('product' + num.toString()).children[1].children[1].innerText.replace(/,/g,'')) | |
} |
View theseus.js
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
var dirs = {'north':0,'east':1,'south':2,'west':3}; | |
var names = ['north','east','south','west']; | |
var obs = {'north':north,'south':south,'west':west,'east':east}; | |
result='east'; | |
if (!direction) direction = 'east'; | |
var left = function() { | |
return names[(dirs[direction] + 3) % 4]; | |
}; |
View gist:1316636
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
$('div.item').find('li').each(function(i, el) { | |
var price = parseFloat($(el).find('span.float-right.large').eq(0).text().split(' ')[0]); | |
var dividend = $(el).find('span.portfolio-meta').eq(0).text(); | |
var pattern = /Last Dividend: ([\d\.]+)/ | |
var pattern_pval = /Portfolio Value:\s([\d\.,]+)e/ | |
var nums = dividend.match(pattern); | |
if (nums) { | |
var divperprice = parseFloat(nums[1]) / price; | |
console.log('Dividend per price for ' + $(el).find('div.influencer-portrait').find('a').eq(0).attr('href') + ': ' + divperprice); | |
} |
View server.js
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
var oc = function(a) { | |
var o = {}; | |
for(var i=0;i<a.length;i++) { | |
o[a[i]]=''; | |
} | |
return o; | |
} | |
var http = require('http'), | |
url = require('url'), |
View test.js
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
var crypto = require('crypto'); | |
var key1 = 155712099; | |
//var key1 = 829309203; | |
var key2 = 173347027; | |
// var key2 = 259970620; | |
//var sign = '^n:ds[4U'; | |
var sign = 'Tm[K T2u'; | |
function intToBigEndian(intstr){ | |
var st = new Buffer(4); |
View nodejs.ru.xsl
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
<?xml version="1.0"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:exslt="http://exslt.org/common" | |
xmlns:math="http://exslt.org/math" | |
xmlns:date="http://exslt.org/dates-and-times" | |
xmlns:func="http://exslt.org/functions" | |
xmlns:set="http://exslt.org/sets" | |
xmlns:str="http://exslt.org/strings" | |
xmlns:dyn="http://exslt.org/dynamic" | |
xmlns:saxon="http://icl.com/saxon" |
NewerOlder