Skip to content

Instantly share code, notes, and snippets.

View tajnymag's full-sized avatar

tajnymag

  • Sator Controls
  • Prague
View GitHub Profile
@tajnymag
tajnymag / vlak
Created October 15, 2017 15:23
Skript pro jednoduchý záznam obsazenosti spoje vlaku
#!/bin/bash
if [ $# -lt 2 ]
then
echo "Nenapsal jsi oba argumenty."
exit 1
fi
smer="$1"
obsazenost="$2"
// RADIATOR MENU STRINGS
#culture
cs-CZ
#menu_title_hurtmeplenty
▶ hurt me plenty
#menu_title_succulent
@tajnymag
tajnymag / LiveDisplay_Toggle.prf.xml
Created June 26, 2017 14:33
LiveDisplay Tasker profile
<TaskerData sr="" dvi="1" tv="4.9u4m">
<Profile sr="prof5" ve="2">
<cdate>1493146038124</cdate>
<clp>true</clp>
<edate>1498482782706</edate>
<id>5</id>
<mid0>2</mid0>
<nme>LiveDisplay Toggle</nme>
<Event sr="con0" ve="2">
<code>1565789502</code>
@tajnymag
tajnymag / s0rce.io.js
Last active May 6, 2023 03:17
Small cheat for properly playing s0urce.io
let commandToWriteImg = document.getElementsByClassName('tool-type-img')[0];
let commandPrompt = document.getElementById('tool-type-word');
let dick = new Map();
function saveToMap() {
dick.set(commandToWriteImg.src, commandPrompt.value);
}
function loadScript(url, callback) {
#!/bin/bash
# 3.1
git filter-branch --force --tree-filter 'find . -path "./.git/*" -prune -o -type f -exec sed -i "s/[Ff][Uu][Cc][Kk]/TODO/g" {} \;' HEAD
# 3.2
cp js/keys.js ../zalohy/ 2>&1
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch js/keys.js' HEAD
# 3.3
In file included from /usr/include/c++/4.9/thread:35:0,
from src/engine.cpp:2:
/usr/include/c++/4.9/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the \
^
src/engine.cpp: In member function ‘void EngineWrapper::drawAllObjects(int, int, Sprite*, std::list<Sprite*>&, std::list<Sprite*>&, std::list<CPowerUp*>&)’:
src/engine.cpp:37:12: error: ‘bullet’ does not name a type
for (auto bullet : bullets_ref) {
^
src/engine.cpp:42:2: error: expected ‘;’ before ‘for’
#!/bin/bash
clear
echo "#include <iostream>" > main.cpp
echo "using namespace std;" >> main.cpp
echo "" >> main.cpp
gedit main.cpp
@tajnymag
tajnymag / FixEdux.js
Last active May 6, 2023 03:17
Simple userscript to disallow opening of lnks in a new window, thus fixing back/forth navigation through the whole Edux ecosystem.
// ==UserScript==
// @name FixEdux
// @namespace Marek Lukáš
// @description Simple userscript to disallow opening of lnks in a new window, thus fixing back/forth navigation through the whole Edux ecosystem.
// @include https://edux.fit.cvut.cz/*
// @updateURL https://gist.githubusercontent.com/Tajnymag/27391e6e80e5ad399fc20c55eb2018c1/raw
// @version 4
// @grant none
// ==/UserScript==
@tajnymag
tajnymag / Program.cs
Created February 14, 2016 17:48
Sttill Alive background melody
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace Still_Alive_Doprovod
{
class Program
{
@tajnymag
tajnymag / Program
Created February 14, 2016 17:47
Still Allive in C# using internal speaker
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace Still_Alive
{
class Program
{