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
// Code from https://gist.github.com/mjackson/5311256 | |
function hue2rgb(p: number, q: number, t: number) { | |
if (t < 0) t += 1; | |
if (t > 1) t -= 1; | |
if (t < 1 / 6) return p + (q - p) * 6 * t; | |
if (t < 1 / 2) return q; | |
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; | |
return p; | |
} |
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 { useExampleStore, ExampleStoreType } from '~/store'; | |
export function useExample() { | |
// You can use stores directly form components, this is only an example of hook | |
const [state, dispatch] = useExampleStore(); | |
function incrementProperty1() { | |
dispatch({ | |
type: ExampleStoreType.ADD_TO_FIRST, | |
payload: 10 |
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
# Add custom rules | |
upstream php { | |
server unix:/var/run/php/php7.0-fpm.sock; | |
#server 127.0.0.1:9000; | |
} | |
# BEGIN fastcgi | |
fastcgi_cache_path /home/nginx-fastcgi-cache levels=1:2 keys_zone=BLOGWORDPRESS:100m inactive=60m; |
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
cki = 0; | |
jQuery('.checkmark-icon.checkbox-icon').each((i, $check) => { | |
if (cki === 95) {return} | |
const count = jQuery($check).parent().parent().parent().find('.click-count--MAIN'); | |
const num = parseInt(count.text(), 10); | |
if (num < 2) { | |
jQuery($check).click(); | |
cki++; | |
} | |
}) |
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
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); |
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
{ | |
"window.zoomLevel": 0, | |
"editor.fontSize": 14, | |
"editor.renderWhitespace": "boundary", | |
"workbench.iconTheme": "vscode-great-icons", | |
"editor.minimap.enabled": true, | |
"stylelint.enable": true, | |
"css.validate": false, | |
"scss.validate": false, | |
"tslint.autoFixOnSave": true, |