Skip to content

Instantly share code, notes, and snippets.

View tajnymag's full-sized avatar

tajnymag

  • Sator Controls
  • Prague
View GitHub Profile
@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
{
@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
{
#!/bin/bash
clear
echo "#include <iostream>" > main.cpp
echo "using namespace std;" >> main.cpp
echo "" >> main.cpp
gedit main.cpp
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
# 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
// RADIATOR MENU STRINGS
#culture
cs-CZ
#menu_title_hurtmeplenty
▶ hurt me plenty
#menu_title_succulent
@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"
@tajnymag
tajnymag / .bashrc
Created November 7, 2017 12:32
AptFixer pro Radka
sudo() { if [[ $@ == "apt remove" ]]; then command sudo apt purge; else command sudo "$@"; fi; }
apt() { if [[ $@ == "remove" ]]; then command apt purge; else command apt "$@"; fi; }
@tajnymag
tajnymag / run_sqldeveloper.sh
Last active March 6, 2018 17:21
Runs/Installs Oracle SQLDeveloper (for Ubuntu/Debian only)
#!/bin/bash
URL="https://transfer.sh/dbct7/sqldeveloper-17.4.0.355.2349-no-jre.zip"
apt list --installed 2>/dev/null | grep unzip >/dev/null || sudo apt update && sudo apt install -y unzip
apt list --installed 2>/dev/null | grep openjdk-8 >/dev/null || sudo apt update && sudo apt install -y openjdk-8-jre openjdk-8-jdk
if [ ! -f "./sqldeveloper/sqldeveloper.sh" ]
then
curl -o sqldeveloper.zip "$URL" && unzip sqldeveloper.zip
@tajnymag
tajnymag / index.js
Created September 8, 2018 12:33
Suuuuuuuuper simple reactive hash router
const app = new Vue({
el: 'my-app',
data() {
return {
current_path: window.location.hash
}
}
});
window.addEventListener('hashchange', () => {