[12:03 AM] acemarke: "controlled" and "uncontrolled" inputs
[12:04 AM] acemarke: if I have a plain, normal HTML page, and I put <input id="myTextbox" type="text" />
in my page(edited)
[12:04 AM] acemarke: and I start typing into that textbox
[12:04 AM] acemarke: it remembers what I've typed. The browser stores the current value for that input
[12:05 AM] acemarke: and then sometime later, I can get the actual element, say, const input = document.getElementById("myTextbox")
, and I can ask it for its value: const currentText = input.value;
[12:05 AM] acemarke: good so far?
[12:08 AM] acemarke: I'll keep going, and let me know if you have questions
[12:08 AM] lozio: ok, actually I'm reading
[12:09 AM] lozio: good
[12:09 AM] acemarke: so, a normal HTML input field effectively stores its own value at all times, and you can get the element and ask for its value
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Usage | |
* This function will append an external OptKit JavaScript to the head of the document. | |
* | |
* @param {String} location - The location of the file you'd like to load. | |
* @param {String} website_id - The OptKit website ID you'd like to load on this variation. | |
* @param {Function} callback - [OPTIONAL] A function to call when the script has completed downloading. | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## How to hide API keys from github ## | |
1. If you have already pushed commits with sensitive data, follow this guide to remove the sensitive info while | |
retaining your commits: https://help.github.com/articles/remove-sensitive-data/ | |
2. In the terminal, create a config.js file and open it up: | |
touch config.js | |
atom config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
if(document.querySelector("#_CRIT_CSS")){return;} | |
var container = document.createElement("div"); | |
container.id = "_CRIT_CSS"; | |
container.innerHTML = '<textarea cols=80 rows=20></textarea><button id="CRIT_FIND">Find Critical CSS</button><button id="CRIT_CLOSE">Exit</button>'; | |
container.style.position = "fixed"; | |
container.style.top = 0; | |
container.style.left = 0; | |
container.style.right = 0; | |
container.style.backgroundColor = "#FFF"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hey All, | |
I am P.B.Surya.Subhash, a 17 Year coder,hacker and a student. | |
Recently I happen to see so many posts regarding this " Google XSS Challenge " and i was fortunate enough to complete them.. | |
These are the solutions for the challenges ;) | |
############################################################################## | |
Level 1: Hello, world of XSS | |
https://xss-game.appspot.com/level1/frame | |
query=<script>alert('xss')</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_theme_suggestions_HOOK_alter() for node.html.twig. | |
*/ | |
function MYTHEME_theme_suggestions_node_alter(array &$suggestions, array $variables) { | |
// Add template suggestions based on the current view mode. | |
$node = $variables['elements']['#node']; | |
$suggestions[] = 'node__' . $variables['elements']['#view_mode']; | |
$suggestions[] = 'node__' . $node->bundle() . '__' . $variables['elements']['#view_mode']; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Include this after bootstrap.css | |
Add a class of 'col-xs-offset-*' and | |
if you want to disable the offset at a larger size add in 'col-*-offset-0' | |
Examples: | |
All display sizes (xs,sm,md,lg) have an offset of 1 | |
<div class="col-xs-11 col-xs-offset-1 col-sm-3"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Open iPhone Simulator on default location for XCode 4.3 if found | |
[[ -d /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] && | |
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app | |
# Open iPhone Simulator on default location for XCode 4.2 if found | |
[[ -d /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] && | |
open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -------------------------------------------------------- | |
// arrows | |
// -------------------------------------------------------- | |
// $direction: top, left, right, bottom, top-left, top-right, bottom-left, bottom-right | |
// $color: hex, rgb or rbga | |
// $size: px or em | |
// @example | |
// .element{ | |
// @include arrow(top, #000, 50px); | |
// } |
NewerOlder