Skip to content

Instantly share code, notes, and snippets.

@costinEEST
costinEEST / html_cleanup.rb
Created January 3, 2016 10:48 — forked from ucarion/html_cleanup.rb
Composing programs to PDF
require 'nokogiri'
input = $stdin.readlines.join
page = Nokogiri::HTML(input)
page.css('.example').each do |elem|
elem.inner_html = '<i>Environment diagram omitted.</i>'
end
page.css('img').remove
@costinEEST
costinEEST / notes-headfirst-python.md
Created January 21, 2016 18:39 — forked from raskasa/notes-headfirst-python.md
Head First Python notes.

TABLE OF CONTENTS

  1. Meet Python - Python Basics
  2. Sharing Your Code
  3. Files and Exceptions
  4. Persistence: Saving Data to Files
  5. Comprehending Data
  6. Custom Data Objects
  7. Web Development
  8. Mobile App Development
@costinEEST
costinEEST / infoq.sh
Created September 22, 2016 07:17 — forked from shirishp/infoq.sh
Download videos from infoq
#! /bin/bash
# Author: Shirish Padalkar (https://twitter.com/_Garbage_)
if [ "$#" -ne 1 ]; then
echo "Usage: $0 infoq_presentation_url"
exit 1
fi
url_with_spaces=`curl -A "Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10" $1 | grep "<source src=" | tr -dc "[:print:]"`
@costinEEST
costinEEST / 0-startup-overview.md
Created September 23, 2016 07:43 — forked from dideler/0-startup-overview.md
Startup Engineering notes
@costinEEST
costinEEST / parse_xlsx.php
Created March 1, 2017 11:51 — forked from searbe/parse_xlsx.php
Parse simple XLSX in PHP with SimpleXML and ZipArchive
<?php
/**
* I had to parse an XLSX spreadsheet (which should damn well have been a CSV!)
* but the usual tools were hitting the memory limit pretty quick. I found that
* manually parsing the XML worked pretty well. Note that this, most likely,
* won't work if cells contain anything more than text or a number (so formulas,
* graphs, etc ..., I don't know what'd happen).
*/
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Subscriptions - [email protected]</title>
</head>
<body>
<outline text="PHP" title="PHP">
<outline htmlUrl="http://mattallan.org" title="mattallan.org" xmlUrl="http://mattallan.org/feed.xml" type="rss" text="mattallan.org"/>
<outline title="asked.io" xmlUrl="https://asked.io/rss" type="rss" text="asked.io"/>
<outline htmlUrl="https://ocramius.github.io/" title="ocramius.github.io" xmlUrl="https://ocramius.github.io/atom.xml" type="rss" text="ocramius.github.io"/>
@costinEEST
costinEEST / getdeviceart.sh
Created February 11, 2018 13:44 — forked from PaulKinlan/getdeviceart.sh
Screen Record for Android
#! /bin/bash
mkdir -p ./backgrounds
function get_google_device_art {
local device=$1
# Get the Google Device backgrounds
curl "https://developer.android.com/distribute/marketing-tools/device-art-resources/$1/port_back.png" > "./backgrounds/$1_port_back.png"
curl "https://developer.android.com/distribute/marketing-tools/device-art-resources/$1/port_fore.png" > "./backgrounds/$1_port_fore.png"
$ git remote rm origin
$ git remote add origin [email protected]:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@costinEEST
costinEEST / Bootstrap_XSS.md
Created December 14, 2019 18:49 — forked from BlackFan/Bootstrap_XSS.md
Bootstrap XSS Collection

CVE-2019-8331

Bootstrap < 3.4.1 || < 4.3.1

✔️ CSP strict-dynamic bypass

➖ Requires user interaction

➖ Requires $('[data-toggle="tooltip"]').tooltip();