Skip to content

Instantly share code, notes, and snippets.

View tothandras's full-sized avatar

András Tóth tothandras

View GitHub Profile
@tothandras
tothandras / atmel128.asm
Last active August 29, 2015 13:57
MERES2 HF
;***************************************************************
;* Feladat: Forgalmi jelzo~lámpa vezérlés
;*
;* Rövid leírás: A jelzo~lámpa 4 fázisban mu^ködik (P-PS-Z-S). A
;* normál mu^ködésen kivül a BT0 gomb megnyomása jelzi egy mento~
;* közeledtét, aminek a leheto~ leghamarabb zöld utat kell adni.
;* A BT1 gomb megnyomása pedig egy dipolomáciai küldöttség
;* érkezését jelzi a keresztutcában, ekkor haladéktalanul le
;* kell állitani a forgalmat (piros lámpa). Mindkét esetben
;* a váltás szabályosan történik. A normál üzem mindkét esetben
maxtrynumber = 1e6;
starttimer = function() {login_wait_timer = setInterval('docheck()', 1);}
@success: #00CC00;
@failure: #c0392b;
@failure-again: #e74c3c;
@warnings: #e67e22;
@running: #f1c40f;
@exception: #9b59b6;
@offline: #bdc3c7;
@not-started: #ecf0f1;
@colors: success, failure, failure-again, warnings, running, exception, offline, not-started;
@tothandras
tothandras / Vagrantfile
Last active August 29, 2015 14:06
VAGRANT UP
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Bootstrap script
$bootstrap = <<SCRIPT
apt-get update
apt-get install -y nodejs nodejs-legacy npm git
npm install -g bower
npm install -g gulp
cd synergy
@tothandras
tothandras / color.js
Last active August 29, 2015 14:07
cheat for game.ioxapp.com/color
var fc;
fc = function() {
var b, boxes, bs, c, color, colors, _i, _len, _results;
boxes = $('#box span');
bs = [];
boxes.each(function(k, v) {
var color;
color = $(v).css('background-color');
return bs.push({
@tothandras
tothandras / CMakeLists.txt
Last active August 29, 2015 14:08
CMakeLists.txt for CLion
cmake_minimum_required(VERSION 2.8.12)
project(Grafika_2)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp)
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
include_directories(${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS})
add_compile_options("-Wno-deprecated-declarations")
########################################################################################################################
# Gulp
########################################################################################################################
gulp = require('gulp')
# Load all gulp plugins and utilities
$ = require('gulp-load-plugins')(pattern: ['gulp-*', 'log', 'del', 'nib', 'jeet', 'main-bower-files'])
$.cleancss = new (require("less-plugin-clean-css"))
advanced: true
@tothandras
tothandras / snippets.cson
Last active August 29, 2015 14:15
Atom Snippets - Typescript AngularJS
###
# Angularjs + Typescript
###
'.source.ts':
'IFI':
'prefix': 'ifi'
'body': """
((): void => {
'use strict';
$1
#!/usr/bin/env python3
"""
Usage: get_wrong_mails.py -c COMPANY -o OUTFILE.json [-u]
@author: Andras Toth
"""
import argparse
import os
import json
import pyldap
@tothandras
tothandras / Get-ProcessMemory.ps1
Last active August 29, 2015 14:19
WSMan configuration management: Windows 8 client; Windows 8, Fedora servers
<#
.SYNOPSIS
Gather memory usage of processes on remote machines
.DESCRIPTION
This script uses WS-Management to gather memory usage of running
processes on remote machines listed in the input csv file.
.PARAMETER Machines
The input csv file. It must containt the following informations of each machine: