Skip to content

Instantly share code, notes, and snippets.

View bialikover's full-sized avatar

Adán G. Galván González bialikover

View GitHub Profile
@toddmotto
toddmotto / *.md
Last active April 25, 2023 09:06
Component versus Directive in AngularJS

Component versus Directive in AngularJS

.component()

Components are not "helper" methods, they are the best change in Angular 1.x since I've been using it.

What is the role of .component()?

  • Declares new HTML via a template or templateUrl
  • Should be used to create Components as part of a Component architecture
@clarkio
clarkio / CSP Harlem Shake Test Instructions.txt
Last active June 5, 2024 21:25
Test script to paste in dev tools console that demonstrates how a CSP can help
// Originally provided here: http://pastebin.com/aJna4paJ
1. Go to Google Chrome
2. Go to any website (works cool on facebook)
3. Right click anywhere -> Inspect Element
4. Click on the rightmost "Console" tab.
5. Copy paste the following * into the console.
6. Make sure the volume isn't too loud!
7. Press Enter.
8. If the audio doesn't play and/or elements on the page don't move then the site has properly implemented a CSP
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote