Skip to content

Instantly share code, notes, and snippets.

@pjozsef
pjozsef / cgs.py
Last active April 28, 2021 18:33
Card Game Simulator Game Helper
# Instructions:
# Make sure you have python3 installed
# Create the sets/:Deck: folder and fill with images
# The name of the :Deck: folder is going to be the name of the Game
# Copy the Banner and CardBack image files to the root folder
# Execute the script from the root folder: `python3 cgs.py`
# Script parameters:
## Image file type - image format of the images, like png or jpg
## Base url - The beginning of the url where the files will be available
### ie if the auto update url is 'https://www.myfilehosting.com/cgsgames/mygame/Game.json'
fun main() {
// printlnGyakorlat()
// olyanMintAzExcel()
// stringMuveletek()
// ifPelda()
// pwd("hahahaha")
// gonoszPwd("azta")
// passwordListaEllenorzes(
oradijSzamolas()
}
@pjozsef
pjozsef / yarn_command
Created June 25, 2020 20:58
Default stuff to install in a new redux app
yarn add @types/material-ui @types/react-redux @types/redux-thunk axios jss lodash react-redux @types/react-redux redux-thunk @reduxjs/toolkit @material-ui/core
opacity: 0.3
background-color:DodgerBlue
background-image: url("paper.gif")
background-repeat: repeat-x
background-position: right top
background-attachment: scroll
background-clip: border-box|padding-box|content-box|initial|inherit;
background-origin: padding-box|border-box|content-box|initial|inherit;
background-size: auto|length|percentage|cover|contain|initial|inherit;
background: #ffffff url("img_tree.png") no-repeat right top
import sys
import time
import uuid
class ConsoleUpdater:
previousCallWasUpdate = False
@staticmethod
def persistent_message(persistent_message=None):
#!/bin/bash
AUTH=`cat ~/.emulator_console_auth_token`
MSG=${1:-"here's an sms"}
PORT_NUM=${2:-"5554"}
PHONE_NUM=${3:-"12345"}
echo -e '\t' Auth: $AUTH
echo -e '\t' Message: $MSG
echo -e '\t' Port number: $PORT_NUM

Lists the commits for the given repo since the date defined in query params.

Requires jq.

curl https://api.github.com/repos/emartech/android-core-sdk/commits?since=2017-12-04T00:00:00Z | jq '.[] | .commit.message'

fun main(args: Array<String>) {
val fizz = listOf("", "", "fizz").infinite()
val buzz = listOf("", "","", "", "buzz").infinite()
val fizzbuzz = fizz.zip(buzz, String::plus)
val numbers = generateSequence(1){it+1}.map(Int::toString)
numbers.zip(fizzbuzz){ num, fb ->
if(fb.isEmpty()) num else fb
}
.take(30)
@pjozsef
pjozsef / systemd.md
Last active April 30, 2017 15:25
Adding a new systemd service

Write service file

[Unit]
Description = *description*
Wants=network-online.target
After=network-online.target

[Service]
Type = simple
ExecStart = *shell script to run*
//Based on:
//https://hackernoon.com/configuring-android-project-version-name-code-b168952f3323
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.ajoberstar:grgit:1.5.0'
}