Skip to content

Instantly share code, notes, and snippets.

@marufsiddiqui
marufsiddiqui / a9 grad prix strategy.txt
Created April 4, 2020 17:39
a9 grad prix strategy
1 - Do not take a training lap and forego all useless rewards.
2 - No qualification (Q1-Q2-Q3) driving.
3 - The required 6 conditions so that you have no time limit or choose the condition that has the highest time limit and make full use of it.
4 - Shop with 500 brands in the finals.
5- Drive just before the end. Then you can assess where you stand. Neither can you orientate yourself on your ghost. Go up a star if necessary.
The goal is to get into a group with bad drivers and end the group with rank 1 and get the only secure key.
1 - Keine Trainingsrunde fahren und auf alle nutzlosen Belohnungen verzichten.
2 – Keine Qualifikation (Q1-Q2-Q3) fahren.
@marufsiddiqui
marufsiddiqui / a9-reps-generator.js
Created November 10, 2019 13:44
Asphalt 9 reps generator per season
const generate = (startDate, seasonsLengthInDays = 28, repPerDay = 4000) => {
return new Array(seasonsLengthInDays).fill(null).map((_, i) => {
const today = new Date(startDate);
const tomorrow = new Date(startDate);
today.setDate(today.getDate() + i)
tomorrow.setDate(tomorrow.getDate() + i + 1)
return [`${today.toLocaleDateString()} - ${tomorrow.toLocaleDateString()}`, repPerDay * (i + 1)].join(',\t')
})
}
{"protocol-version":"1.0","general-settings":{"app-language":"en-GB","allow-acceptable-ads":false,"show-blocked-ads-count":false,"autodetect-filters":true,"safebrowsing-enabled":true,"safebrowsing-help":false,"filters-update-period":86400000},"extension-specific-settings":{"use-optimized-filters":false,"collect-hits-count":false,"show-context-menu":true,"show-info-about-adguard":true,"show-app-updated-info":true},"filters":{"enabled-groups":[1,2,3,4,7],"enabled-filters":[14,16,1,2,3,4,6,7,8,9,102,104,107,109,112,115,216,101,249],"custom-filters":[],"user-filter":{"rules":"","disabled-rules":""},"whitelist":{"inverted":false,"domains":["www.nuk.de","www.turkishairlines.com","sl.se","www.shoop.de","www.amazon.de","scondoo.de","de.tommy.com","www.saturn.de","transferwise.com","www.oralb.co.uk","www.bagsonline.de","www.mediamarkt.de","www.plex.tv","www.calvinklein.de","localhost","www.o2online.de","www.aboalarm.de","www.moemax.de","www.freetutorialseu.com","1hack.us","www.grainau.de","www.ftuforums.com","www.text

This blog post is a quick introduction to TypeScript’s notation for static types.

What you’ll learn  #

After reading this post, you should be able to understand what the following code means:

interface Array<T> {
  concat(...items: Array<T[] | T>): T[];

reduce(

@marufsiddiqui
marufsiddiqui / 1.js
Created October 15, 2018 09:56
webpack.js
cacheGroups: {
critical: {
name: 'critical',
test: m => {
const name = m.identifier()
if (m.identifier().endsWith('.css') && name.includes('critical')) {
console.log('critical', name)
}
return m.identifier().endsWith('.css') && name.includes('critical')
},
@marufsiddiqui
marufsiddiqui / RestoreScroll.js
Created July 13, 2018 12:11
RestoreScroll.js
class RestoreScroll extends React.Component {
rememberScroll () {
window.requestAnimationFrame(() => {
console.log('scrollY', window.scrollY)
window.sessionStorage.setItem(SCROLL_KEY, window.scrollY)
})
}
restoreScroll () {
const scrollPosition = window.sessionStorage.getItem(SCROLL_KEY)
@marufsiddiqui
marufsiddiqui / stack-string.js
Created July 23, 2017 09:50
stack-string.js
var DEL = "***";
function Stack() {
this.storage = "";
}
Stack.prototype.push = function(val) {
this.storage = this.storage.concat(DEL, val);
}
import React from 'react'
import hoistNonReactStatics from 'hoist-non-react-statics'
import { assoc, assocPath, identity, is, map, prop } from 'ramda'
import isValid from './isValid'
// random helper function
// extract the needed information from the event
const getValueName = (e) => {
const target = e.target
const name = target.name
@marufsiddiqui
marufsiddiqui / interviewitems.MD
Created May 19, 2017 12:09 — forked from amaxwell01/interviewitems.MD
My answers to over 100 Google interview questions

##Google Interview Questions: Product Marketing Manager

  • Why do you want to join Google? -- Because I want to create tools for others to learn, for free. I didn't have a lot of money when growing up so I didn't get access to the same books, computers and resources that others had which caused money, I want to help ensure that others can learn on the same playing field regardless of their families wealth status or location.
  • What do you know about Google’s product and technology? -- A lot actually, I am a beta tester for numerous products, I use most of the Google tools such as: Search, Gmaill, Drive, Reader, Calendar, G+, YouTube, Web Master Tools, Keyword tools, Analytics etc.
  • If you are Product Manager for Google’s Adwords, how do you plan to market this?
  • What would you say during an AdWords or AdSense product seminar?
  • Who are Google’s competitors, and how does Google compete with them? -- Google competes on numerous fields: --- Search: Baidu, Bing, Duck Duck Go
@marufsiddiqui
marufsiddiqui / qsort_es6.js
Created May 14, 2017 09:14
Quick Sort Es6
function qsort(arr) {
if (arr.length < 2) {
return arr;
}
const [pivot, ...rest] = arr;
const less = rest.filter(x => x <= pivot);
const greater = rest.filter(x => x > pivot);
return [...qsort(less), pivot, ...qsort(greater)];