Skip to content

Instantly share code, notes, and snippets.

View marcotinacci's full-sized avatar
👾

Marco Tinacci marcotinacci

👾
View GitHub Profile
@marcotinacci
marcotinacci / xml
Created August 3, 2017 08:26
CORS configuration for allowing GET from everywhere
<CORSConfiguration>
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
@marcotinacci
marcotinacci / httpd.conf
Created August 2, 2017 11:29
Apache 2.4 config to serve static files from S3
ProxyRequests off
ProxyPass /static/ http://bucketname.s3.amazonaws.com/
@marcotinacci
marcotinacci / remove_attributes.py
Last active July 17, 2017 15:25
Python regex to remove any attribute from tags
import re
html = "<p class='myclass'>paragraph</p>"
html = re.sub("<([^> /]+)[ ]?[^>]*>","<\g<1>>", html)
@marcotinacci
marcotinacci / device.sass
Last active June 19, 2017 11:57
Simple sass responsive mixin
// breakpoint key measures
$tablet-min: 426px
$desktop-min: 1024px
// breakpoint queries
$mobile: ( max-width: $tablet-min - 1 )
$tablet: ( min-width: $tablet-min, max-width: $desktop-min - 1 )
$desktop: ( min-width: $desktop-min )
$device-size: ( "mobile": $mobile )
### Keybase proof
I hereby claim:
* I am marcotinacci on github.
* I am tinerd (https://keybase.io/tinerd) on keybase.
* I have a public key ASD5eo8FGtpARDZIFHRRn6VLOEgmgKZ1GTwVOq0301Pp5Ao
To claim this, I am signing this object: