If you have any issues with macOS, or need anything related to it check this documentation
Install Xcode Command Line tools :
If you have any issues with macOS, or need anything related to it check this documentation
Install Xcode Command Line tools :
| function countListener(onCountChange: (count: number) => void) { | |
| const query = firebase.firestore().collection("fruits"); | |
| let count = 0; | |
| return query.onSnapshot(snapshot => { | |
| snapshot.docChanges().forEach(change => { | |
| if (change.type === "added") onCountChange(++count); | |
| if (change.type === "removed") onCountChange(--count); | |
| }); | |
| }); | |
| } |
| # Source: https://gist.github.com/ae00efa6892fcb0b295bbdba73bef3ad | |
| ############################################ | |
| # Applying GitOps Principles Using Argo CD # | |
| ############################################ | |
| ###################################### | |
| # Installing And Configuring Argo CD # | |
| ###################################### |
| // create a bookmark and use this code as the URL, you can now toggle the css on/off | |
| // thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
| javascript: (function() { | |
| var domStyle = document.createElement("style"); | |
| domStyle.append( | |
| '* { color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }\ | |
| * * { background-color: rgba(0,255,0,.2) !important; }\ | |
| * * * { background-color: rgba(0,0,255,.2) !important; }\ | |
| * * * * { background-color: rgba(255,0,255,.2) !important; }\ | |
| * * * * * { background-color: rgba(0,255,255,.2) !important; }\ |
| // please check https://docs.netlify.com/configure-builds/environment-variables/#declare-variables for most up to date info | |
| // this was created before those docs existed | |
| process.env = { | |
| /** | |
| * | |
| * AUTOMATICALLY SET BY NETLIFY. IMMUTABLE! | |
| * docs: https://www.netlify.com/docs/continuous-deployment/#environment-variables | |
| * | |
| */ |
| /** | |
| * This is now a npm package! | |
| * Please find the better version of this gist here: | |
| * https://github.com/d4rekanguok/netlify-cms-widgets/blob/master/packages/widget-id/src/control.tsx | |
| */ |
| <?php | |
| // Somewhere off in your wp-config.php make sure you replace 123456 with your api key. | |
| define( 'NETLIFY_API_KEY', '123456' ); | |
| // Somewhere off in your theme or even a plugin. | |
| /** | |
| * Netlify Webhook Build Function | |
| * |
| (function (context, trackingId, options) { | |
| const history = context.history; | |
| const doc = document; | |
| const nav = navigator || {}; | |
| const storage = localStorage; | |
| const encode = encodeURIComponent; | |
| const pushState = history.pushState; | |
| const typeException = 'exception'; | |
| const generateId = () => Math.random().toString(36); | |
| const getId = () => { |
| exports.handler = (event, context, callback) => { | |
| const response = { | |
| statusCode: 301, | |
| headers: { | |
| Location: 'https://google.com', | |
| } | |
| }; | |
| return callback(null, response); | |
| } |
| Promise.all([ | |
| someThingThatReturnsAPromise(), | |
| otherThingThatReturnsAPromise(), | |
| lastThingThatReturnsAPromise() | |
| ]) | |
| .then( results => | |
| { | |
| // this... | |
| const [first, second, third] = results; | |
| // ... instead of |