This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
name: "richtypo", | |
author: { name: "Balint Erdosi" }, | |
license: "GPL", | |
description: "Tipo- és ortográfiai korrekciókat végez a textareában kiválasztott szövegen", | |
takes: {"input": noun_arb_text}, | |
execute: function richTypo(input) { | |
var str = input.html | |
.replace(/\.\.\./g,'…') | |
.replace(/--/g,'–') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Do not remove the @namespace line -- it's required for correct functioning | |
*/ | |
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */ | |
/* a menü jobb szélére pakolom a menüt, és felhúzom oda a toolbar nagy részét. A menü csak akkor lesz teljes méretű, ha az egér fölé ér. TinyMenu extension helyett :) */ | |
menubar { | |
width: 24px; | |
overflow: hidden; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BELEPES_USERNAME=töltsd_ki | |
BELEPES_JELSZO=ezt_is | |
TEMPFILE=`tempfile` | |
HREF=`curl -isL -c $TEMPFILE www.tvn.hu | grep Location | sed -e "s#.*\(http://.*\)index.tvn#\1iranymondo.tvn#" | tail -n 1` | |
POSTDATA="belepes_username=${BELEPES_USERNAME}&belepes_jelszo=${BELEPES_JELSZO}&js_autodetect_results=0&just_logged_in=1&varas=tvn.hu&gokep.x=29&gokep.y=8" | |
curl -sL -b $TEMPFILE -c $TEMPFILE -d $POSTDATA $HREF | |
rm $TEMPFILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OUTFILE="$1.pau" | |
echo '<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<!--This is a lesson file for Pauker (http://pauker.sourceforge.net)--> | |
<Lesson LessonFormat="1.7"> | |
<Description/> | |
<Batch>' > $OUTFILE | |
sed $1 -e 's#\(.*\)\t\(.*\)# <Card>\n <FrontSide Orientation="LTR" RepeatByTyping="false">\n <Text>\1</Text>\n </FrontSide>\n <ReverseSide Orientation="LTR" RepeatByTyping="false">\n <Text>\2</Text>\n </ReverseSide>\n </Card>#' >> $OUTFILE | |
echo ' </Batch> | |
<Batch/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function* fibonacci() { var act = 1, prev = 1; while (true) { t = act; yield act = (act + prev); prev = t } } | |
// not the primes, but binary according to primality | |
function* primes(){ var n = 2; while(true) {for(var i=2;i<=Math.sqrt(n);i++) if (0==n%i) yield false, ++n; yield true, ++n} } | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* code based on pseudocode from https://en.wikipedia.org/wiki/Wagner%E2%80%93Fischer_algorithm#Calculating_distance */ | |
interface replacePair { | |
first: string; | |
second: string; | |
cost: number | |
} | |
class replacePairCollection { | |
replacePairs: Array<replacePair>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MIT License | |
Copyright (c) 2009-2016, Bálint Erdősi | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# list from https://hu.wikipedia.org/wiki/Magyar_n%C3%A9vnapok_list%C3%A1ja_d%C3%A1tum_szerint | |
echo $(grep `date +%m/%d` $0) napja van | |
exit | |
01/01 Alpár Fruzsina Bazil | |
01/02 Ábel Gergely Vazul | |
01/03 Genovéva Gyöngyvér Benjámin Dzsenifer ((Jennifer)) | |
01/04 Titusz Leona Angéla | |
01/05 Simon Emília | |
01/06 Gáspár Menyhért Boldizsár |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat *.html | sed -e 's/<[^>]\+>//g' -e 's/[ \t]\+/\n/g' -e 's/[-\.\\(\\):,;0-9+|]//g'|sort | uniq -ci | sort -h | |
cat *.html | \ # all the files' contents | |
sed -e 's/<[^>]\+>//g' \ # without tags (assumes they don't contain line breaks) | |
-e 's/[ \t]\+/\n/g' \ # replace tabs and spaces with line breaks | |
-e 's/[^a-z]//gi' | \ # remove some non-letters ( | |
sort | \ # sort once to make uniq work | |
uniq -ci | \ # show occurrence counts, case insensitive | |
sort -h # sort by numbers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rq = require("http"); | |
const url = "http://www.bamosz.hu/alapoldal?isin=HU0000711353"; | |
const htmlParser = require("htmlparser"); | |
const parseHtml = function(html) { | |
return new Promise((resolve, reject) => { | |
(new htmlParser.Parser( | |
new htmlParser.DefaultHandler( | |
(error, dom) => { |
OlderNewer