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
<div class="org"> | |
org | |
</div> | |
<div class="mine"> | |
mine | |
</div> | |
<div class="target"> | |
target | |
</div> |
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
<div class="org"> | |
org | |
</div> | |
<div class="mine"> | |
mine | |
</div> | |
<div class="target"> | |
target | |
</div> |
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
// assuming you have constant that looks like that: | |
const serverSEOUrls = { | |
'super-seo-friendly-category-url': {type: 'category', id: 1}, | |
'super-seo-friendly-tag-url': {type: 'tag', id: 24} | |
}; | |
angular.module('app', []) | |
.config(($stateProvider, $urlMatcherFactoryProvider) => { | |
$urlMatcherFactoryProvider.type('dbType', { | |
encode: function (urlDef) { |
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
/** | |
* Playing with background-attachment | |
*/ | |
pre { | |
max-height: 150px; | |
border: 1px solid silver; | |
overflow: auto; | |
background: url('http://via.placeholder.com/350x150'); | |
color: white; |
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
/** | |
* CssVars - currentColor | |
*/ | |
button { | |
border-color: currentColor; | |
color: red; | |
} | |
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
// ---- | |
// libsass (v3.5.4) | |
// ---- | |
$themes: ( | |
light: ( | |
text: black | |
), | |
dark: ( |
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 class LazyLoader { | |
constructor($injector, $rootScope) { | |
this.$injector = $injector; | |
this.$rootScope = $rootScope; | |
} | |
async loadModules(bundleUrl) { | |
const moduleName = await import(bundleUrl); | |
const alreadyLoadedModules = Object.keys($injector.modules); |
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, createElement, cloneElement } from 'react'; | |
import { withFormsy } from 'formsy-react'; | |
import { Form, Input, TextArea } from 'semantic-ui-react'; | |
import { filterSuirElementProps } from './utils'; | |
import PropTypes from 'prop-types'; | |
class FormsyInput extends Component { | |
static propTypes = { | |
id: PropTypes.string, | |
name: PropTypes.string.isRequired, |
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 { Job } from 'bullmq'; | |
import ms from 'ms'; | |
// taken from https://github.com/tanem/react-nprogress/blob/ec007096e08af79179b8530a4915e225075d37ac/src/clamp.ts | |
function clamp(num: number, lower: number, upper: number): number { | |
num = num <= upper ? num : upper; | |
num = num >= lower ? num : lower; | |
return num; |
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 { devModeInterceptor } from './devModeInterceptor'; | |
class CriticalAPI { | |
private axios: AxiosInstance; | |
constructor() { | |
this.axios = Axios.create({ | |
baseURL: process.env.BASE_URL, | |
}); | |
this.axios.interceptors.request.use(devModeInterceptor); |