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
require "rubygems" | |
require "json" | |
require "net/http" | |
require "uri" | |
puts "" | |
puts "Enter your Twitter username:" | |
username = gets.chomp |
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
<a href="javascript:!function(e){var t=prompt('Please enter a URL for the background image to be applied to the <html> element:','designExport.jpg');null!=t?(e.documentElement.style.background='url('+t+') no-repeat center top',e.body.style.opacity='.5'):e.body.style.opacity='1'}(window.document);">BG IMG CHCKR</a> |
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
When you don't have access to the source code of a form, you may be stuck in a position where autofill doesn't work and you are doing a lot of repetitive entry. That's where this script comes in. Now you click a button and the form autofills with (static) values of your choice and immediately submits. Some forms may not work very well with this approach (like ones where the fields are dynamic, don't have distinguishable attribute identifiers, etc.), but it works well for my current use case. YMMV. | |
The code (without preview, due to good security restrictions): | |
<a href="javascript:!(function (doc) { doc.getElementById('HwPxTokenOneField').value = 'Doe'; doc.getElementById('HwPxDOBMonthField2').value = '01'; doc.getElementById('HwPxDOBDayField2').value = '17'; doc.getElementById('HwPxDOBYearField2').value = '1971'; doc.getElementById('HwPxLoginButton').click()})(window.document);">eSDP Login</a> | |
The example and demo (use this to actually add the bookmarklet): | |
https://jsfiddle.net/nathanlogan/b3znt9q2/ |
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
import React, { Component } from 'react' | |
class MyTopLevelComponent extends Component { | |
componentDidMount () { | |
this.scrollToHashId() | |
} | |
componentDidUpdate () { | |
this.scrollToHashId() | |
} |
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
{ | |
"name": "", | |
"version": "", | |
"description": "", | |
"repository": {}, | |
"scripts": { | |
"link-one:osx": "cd src/components/ && select fname in */; do (cd $fname && npm link) && break; done && cd ../..", | |
"link-all:osx": "cd src/components/ && for fname in */; do (cd $fname && npm link); done && cd ../.." | |
}, | |
"dependencies": {}, |
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
export const formatDateAsDefaultLocale = (incomingDate: string | Date, options?: Intl.DateTimeFormatOptions): string => { | |
const defaultOptions = { day: 'numeric', month: 'short', year: 'numeric' } | |
const date = new Date(incomingDate) | |
return date.toString() !== "Invalid Date" ? date.toLocaleString('default', options || defaultOptions) : ''; | |
} |