Skip to content

Instantly share code, notes, and snippets.

Avatar

Gábor Molnár molnarg

View GitHub Profile
@molnarg
molnarg / angularjs-sandbox-escape.md
Last active Aug 3, 2017
An AngularJS Template Expression Sandbox Escape
View angularjs-sandbox-escape.md

An AngularJS Template Expression Sandbox Escape

Short Proof of Concept

<!doctype html>
<html>
<head>
@molnarg
molnarg / test-node-compression.js
Last active Jan 2, 2016
The script used to generate the test output of node-http2-protocol for [Jxck's compression test suite](https://github.com/Jxck/hpack-test-case)
View test-node-compression.js
var fs = require('fs')
var compressor = require('./node_modules/node-http2-protocol/lib/compressor')
var log = require('./node_modules/node-http2-protocol/test/util').createLogger('test')
var HeaderTable = compressor.HeaderTable;
var HuffmanTable = compressor.HuffmanTable;
var HeaderSetCompressor = compressor.HeaderSetCompressor;
var HeaderSetDecompressor = compressor.HeaderSetDecompressor;
for (var i = 0; i < 31; i++) {
@molnarg
molnarg / cfb_monkey_patch.py
Created Nov 8, 2013
Monkey patching the python cfb library to support overwrite of data.
View cfb_monkey_patch.py
from cfb.directory.entry import Entry
from cfb.constants import ENDOFCHAIN
# Monkey patching Entry
def overwrite(self, data):
"""
Writes `data` to the current directory entry at the current position. If
`data` is bigger than the available space in the entry, then the rest of
`data` is ignored. It returns the number of bytes written.
@molnarg
molnarg / oraimunka.md
Last active Dec 17, 2015
Szent Angéla programozás szakkör - 2013. 04. 30.
View oraimunka.md

Szent Angéla programozás szakkör - 2013. 04. 30.

Chrome konzol kisérletezéshez:

  • Konzol megnyitása Chrome-ban: Ctrl+Shift+J
  • Enter: a beírt parancs kiértékelése
  • Shift + enter: parancs folytatása új sorba

Előző jegyzetek puskázáshoz:

View bolygok.html
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<canvas id="rajz" width="700" height="700"></canvas>
<script>
View fibonacci.html
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<canvas id="rajz" width="700" height="700"></canvas>
<script>
View index.html
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<title>Download SVG</title>
<style type="text/css">
a{
cursor: pointer;
text-decoration: underline;
color: black;
View server.js
var http = require('http'),
fs = require('fs')
var start = +new Date
var data = 0
var last_calculation = 0
var written = 0
var calculate = function() {
You can’t perform that action at this time.