Here is a tip! add this function to your .bashrc / .profile file:
function ding(){
if [[ $? != 0 ]] ; then
afplay /System/Library/Sounds/Basso.aiff
else
afplay /System/Library/Sounds/Glass.aiff
fi
}
// works on Chrome (need async-await support) | |
// go to https://app.intercom.io/a/apps/<APP ID>/billing/invoices | |
// and run this: | |
(async function(){ | |
const printPdf = function (url, title) { | |
let iframe; | |
return new Promise((resolve, reject)=> { | |
console.log(url, title) | |
iframe = document.createElement('iframe'); |
usage: | |
node ./custom-react-scripts start |
var React = require('react'); | |
var ReactDom = require('react-dom/server'); | |
import {match, RouterContext} from "react-router"; | |
import Main from "../../app/Main"; | |
import routes from "../../app/routes"; | |
export default class ServerSideRenderer { | |
static render(req) { | |
return new Promise((resolve, reject)=> { |
let searchRoot = ReactDom.render(React.createElement(Main), document.getElementById('main')); | |
try { | |
var getComponent = (comp) => comp._renderedComponent ? getComponent(comp._renderedComponent) : comp; | |
var getComponentById = (id)=> { | |
var comp = searchRoot._reactInternalInstance; | |
var path = id.substr(1).split('.').map(a=> '.' + a); | |
if (comp._rootNodeID !== path.shift()) throw 'Unknown root'; | |
while (path.length > 0) { | |
comp = getComponent(comp)._renderedChildren[path.shift()]; |
<head> | |
<!-- | |
first, download "swfobject.js" from the site i sent you and place it in your folder | |
--> | |
<script type="application/javascript" src="swfobject.js"></script> <!-- this make sure the swfobject.js is loaded --> | |
<script type="application/javascript"> | |
document.onreadystatechange = function () { | |
if(document.readyState === "complete"){ | |
// insert here the container id you wish to embed the swf in it | |
var el = document.getElementById("my-target-element"); |
Here is a tip! add this function to your .bashrc / .profile file:
function ding(){
if [[ $? != 0 ]] ; then
afplay /System/Library/Sounds/Basso.aiff
else
afplay /System/Library/Sounds/Glass.aiff
fi
}