Skip to content

Instantly share code, notes, and snippets.

View 3n3a's full-sized avatar
🥰
fibonacci...

3n3a 3n3a

🥰
fibonacci...
View GitHub Profile
@3n3a
3n3a / index.html
Created May 5, 2022 06:05
SampleMap
<div id="map" style="width: 300px; height: 300px;">
</div>
@3n3a
3n3a / HNWidget.scriptable
Last active March 3, 2022 15:30
A Scriptable Widget that shows the top Hackernews posts
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: red; icon-glyph: laptop;
/*
* HNWidget
* @doc Widget that shows top 5 Posts from HN
* @author 3n3a
* @returns null
*/
class HNWidget {
@3n3a
3n3a / a4-css-page-template.markdown
Created October 19, 2021 21:07
A4 CSS page template

A4 CSS page template

basic CSS template for A4 print

BONUS: includes style for A2 and A5!

A Pen by 3n3a on CodePen.

License.

@3n3a
3n3a / a4-css-page-template.markdown
Created October 19, 2021 21:07
A4 CSS page template

A4 CSS page template

basic CSS template for A4 print

BONUS: includes style for A2 and A5!

A Pen by 3n3a on CodePen.

License.

@3n3a
3n3a / app.py
Created June 5, 2021 13:10
Capture the Flag Flask Server. To get the flag one needs to set the Content-Lenght HTTP Header when requesting the site --> if done flag is appended.
from flask import Flask, render_template, make_response, request
app = Flask(__name__)
@app.route('/')
def index():
# Creates Response object & adds headers
# #here you could use make_response(render_template(...)) too
re = make_response("123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123451234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234512345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123451234567891234567891234567891234567891234FLAG_123")
@3n3a
3n3a / netflix-bloclist.dns.txt
Created February 13, 2021 16:34
dns blocklist -> blocks access to netlfix; these have to be wildcard, meaning, that all domains ... .netflix.com are going to be blocked, e.g. also api.netflix.com etc.
netflix.com
nflxso.net
nflximg.com
nflxext.com

run bash script

curl https://gist.github.com/3n3a/5e6509676a655b2561a9557a34a4ea88/raw/fa7d9cf2c4bcf92b5a0cc90e507391cee2390053/hrsf.sh | sh -
@3n3a
3n3a / upload-s3.md
Created February 8, 2021 19:10
An example of how to use the AWS-SDK to upload documents to s3 bucket
#!/bin/sh
# geberate files.txt for files to concat => all wav files in current dir
# with a bash for loop
for f in ./*.wav; do echo "file '$f'" >> files.txt; done
# or with printf
# printf "file '%s'\n" ./*.wav > mylist.txt
# concat the files that were specified in files.txt
ffmpeg -f concat -safe 0 -i files.txt -c copy Chapter_One.wav