View gist:f081d5c9de04cdc31a93406f6b1e5c1a
var halire = 0;
var prispevky = 0;
document.querySelectorAll("td.amount.amount_value").forEach(function(elm) {
const cash = elm.getAttribute("data-value")*1;
if(cash>1) prispevky +=cash;
else halire+=cash;
});
[halire, prispevky]
View casy.js
var casy2 = [
["7:30", "8:15"],
["8:15", "9:00"],
["9:15", "10:00"],
["10:00", "10:45"],
["11:00", "11:45"],
["11:45", "12:30"],
["12:45", "13:30"],
["13:30", "14:15"],
["14:30", "15:15"],
View refresh.js
console.log("This script changes cached resources' path in GreaseMonkey addon folder to force refresh.");
console.log("Press any key to start adding files.");
/*process.stdin.setRawMode(true);
process.stdin.resume();
process.stdin.on('data', ()=>{getFiles(updateLoop);}); */
var fs=require("fs");
var path = require("path");
/*var prompt = require('prompt-sync');
View spam_phishing.py
import httplib, urllib
params = {
"app": "",
"login_post": "1",
"url": "",
"anchor_string": "",
"username": "dsavffsfds",
"password": "fdsfdsfdsfds",
"horde_select_view": "auto",
"new_lang": "en_US"}
View pocitani konvoluce.cpp
void Image::convolute(const int matrix[3][3], Image& target)
{
target.setSize(getWidth(), getHeight());
for(size_t y=0, yl=getHeight(); y<yl; ++y) {
for(size_t x=0, xl=getWidth(); x<xl; ++x) {
if(x==0 || y==0 || x+1==xl || y+1==yl) {
target.pixels[y][x] = pixels[y][x];
}
else {
target.pixels[y][x] = ((pixels[y-1][x-1]*matrix[0][0])
View rickroll-once.js
const RICKROLL = "https://www.youtube.com/watch?v=oHg5SJYRHA0";
const RICKROLL_DAY = 1;
const RICKROLL_MONTH = 4;
if(Storage && window.localStorage && window.localStorage instanceof Storage) {
// Check if it's 1st of April
var date = new Date();
// Note that months are zero indexed
if(date.getDate() == RICKROLL_DAY && date.getMonth() == RICKROLL_MONTH-1) {
// If local storage does not work, rickroll will simply never occur
// this is a safety measure to prevent people being rickrolled forever
View HomeworkTestBase.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package test;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
View KOS_multiple_tabs.user.js
// ==UserScript==
// @name KOS multiple tabs
// @namespace util
// @description Allows you to use KOS in mutiple tabs.
// @include https://www.kos.cvut.cz/kos/*
// @version 1
// @grant none
// ==/UserScript==
// Name of local storage entry where page id is stored
const DATA_NAME = "KOS_PAGE_ID";
View pypy_test.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title>PyPy</title>
</head>
<body>
<h2>Select python file</h2>
<input type="file" id="files" name="file" multiple />
View main.js
/**
* Module dependencies.
*/
var express = require('express')
, graph = require('fbgraph');
var app = express();
var server = require("http").createServer(app);