Skip to content

Instantly share code, notes, and snippets.

@Szpadel
Szpadel / Readme.md
Last active Jun 12, 2020
screeps-tracer
View Readme.md

Note: Currently this only works via Steam client

Usage:

Trace single function/method

@trace
function something() {
}
View brew-upgrade.sh
#!/usr/bin/env bash
sudo -v
trap 'echo "Something went wrong, restart script to retry"' ERR
set -ex
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
downloadPkg() {
echo "Downloading $1..."
@Szpadel
Szpadel / meltdown-check.sh
Last active Jan 15, 2018
Script for checking system status against Meltdown issue
View meltdown-check.sh
#!/usr/bin/env bash
CR="\e[0m"
CBAD="\e[41m"
CWRN="\e[33m"
COK="\e[32m"
CINF="\e[34m"
isPcidPresent() {
grep -q pcid /proc/cpuinfo
@Szpadel
Szpadel / google-maps-info-styles.js
Created Jun 3, 2015
Adds css classes to google maps popups
View google-maps-info-styles.js
(function(){
function styleAllBoxes() {
var cnt = $('.gm-style-iw');
cnt.each(function(index){
styleBox($(cnt[index]));
});
}
function styleBox(item) {
@Szpadel
Szpadel / example.cpp
Last active Aug 29, 2015
MPI Datatybe Builder
View example.cpp
#include <mpidatatypebuilder.h>
#include <mpi.h>
using namespace std;
struct DataSet {
double vectorA[131072];
double vectorB[131072];
double arg1;
View benchmark.php
<?php
class Benchmark
{
private $tests = [];
private $command = "";
private $multiple = 10;
private $results = [];
View robot.js
var robots = new Array();
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.start = function( ev ){