Skip to content

Instantly share code, notes, and snippets.

View anthony-dandrea's full-sized avatar

Anthony D'Andrea anthony-dandrea

  • Milwaukee, WI
View GitHub Profile
@anthony-dandrea
anthony-dandrea / movies.json
Last active November 26, 2023 22:24
movies.json
[
{
"title": "12 Angry Men",
"start": "2023-04-01",
"end": "2023-07-01"
},
{
"title": "The Hurt Locker",
"start": "2023-07-29",
"end": "2023-08-01"
@anthony-dandrea
anthony-dandrea / bat.md
Created October 31, 2019 17:01
batman - keyframes/animations VS inline styles

Animation & Keyframes

  • Requires CSS
  • Styles isolated into a single CSS classname
  • Only need to remove the class with one event listener
const BATMAN_CLASS = 'batman';

export default function batmanBounce() {
  const { body } = document;
  const reset = function() {
@anthony-dandrea
anthony-dandrea / vscode.json
Last active July 13, 2019 00:05
vscode settings
{
"workbench.iconTheme": "vscode-icons",
"window.zoomLevel": 0,
"editor.tabSize": 2,
"editor.wordWrap": "on",
"editor.fontSize": 14,
"editor.renderWhitespace": "all",
"files.autoSave": "onFocusChange",
"files.insertFinalNewline": true,
"workbench.colorCustomizations":{
window.mghf = 1;
@anthony-dandrea
anthony-dandrea / reduxAndImmutable.md
Last active June 2, 2016 04:18
Write up of my immutable adventures

What is Redux?

A single state tree so React components can "talk" to each other. For example we click an "add to cart" button and want to +1 to the number in the header for cart items. The flow for changes in the tree go like so:

Components listening to click -> onclick redux action dispatches event -> reducer see's dispatch and if it corresponds to that event it will update state -> Components get new state passed down via props

^ If you're a react noob and it doesn't make much sense. Don't trip too hard because we're not talking about how redux works as much as immutablility.

What does immutable mean?

@anthony-dandrea
anthony-dandrea / iOSHack.md
Last active June 28, 2022 07:48
How to pop iOS locks

Pop App Locks

For these hacks the iPhone must be jailbroken. But there currently is a jailbreak available for iOS 8.4 and some below. 4 digit pins can be bruteforced unless there is a attempt limit. Even with the limit it can still be hacked but you would need to break the phone open to rig the power to cut before the attempt is registered. Example here.

For all of these you need:

  • Phone to be jailbroken
  • OpenSSH installed on the phone

###1) Dump the iOS Keychain

@anthony-dandrea
anthony-dandrea / idea.md
Last active August 29, 2015 14:26
scrty encryption flow idea

The user bigpapa logs in then wants to store a new password.

So they give the BE:

App/Site Name Passwd
Reddit.com foobz

The backend encrypts the password and stores this app/site name with their username with previous sites/apps stored in a db like so:

I pretty much just followed the directions here - http://scottjehl.github.io/picturefill/ In my markup I have something like:

  <html>
    <head>
      <script src="scripts/vendor/picturefill.min.js"></script>
    </head>
    <body>
 
"""
For reference I'm trying to create a Pelican plugin
that will load templates from a python package before
loading the regular template path in the repo.
https://github.com/getpelican/pelican/blob/807b3bced38bff7b83a2efa2ce8cda9d644ebad3/pelican/generators.py#L61-L70
http://docs.getpelican.com/en/3.5.0/plugins.html#list-of-signals
"""
class Generator(object):
@anthony-dandrea
anthony-dandrea / gist:2dc50bc8143bfd02ad17
Last active August 29, 2015 14:19
Python Webassets example

In my site.py I just need to import webassets. I'm using the flask flavor but there's one for every major python framework. https://webassets.readthedocs.org/en/latest/

from flask.ext.assets import Environment, Bundle

Then in my base.html for sass/compass and css minification I have a filter like this:

{% assets filters='compass,scss,cssmin', depends='styles/**/*.scss', output='styles/site.min.css', 'styles/site.scss'%}
  <link rel="stylesheet" type="text/css" href="{{ ASSET_URL }}">
{% endassets %}