I hereby claim:
- I am beshur on github.
- I am shu (https://keybase.io/shu) on keybase.
- I have a public key ASCwgu0UpuiydMOwgNxaqatExgv9AJomk-ClB91-OB281Qo
To claim this, I am signing this object:
/* global Cypress, cy */ | |
const commandsToMock = ['vrtStart', 'vrtStop', 'vrtTrack', 'vrtTrackBuffer', 'vrtTrackBase64']; | |
export default function mockVrtComands() { | |
commandsToMock.forEach((command) => { | |
Cypress.Commands.add( | |
command, | |
{ | |
// optional: may start a chain, or use an existing chain: (dual command) | |
prevSubject: 'optional', | |
}, |
#!/usr/bin/env node | |
const { readFileSync } = require("fs"); | |
const cp = require("child_process"); | |
function openUrl(port) { | |
const data = btoa(readFileSync("./prisma/schema.prisma", "utf8")); | |
console.log("data.length", data.length); | |
const start = | |
process.platform == "darwin" | |
? "open" |
import {danger} from 'danger'; | |
const enFile = 'lang/en.json'; | |
const deFile = 'lang/de.json'; | |
const NEEDS_TRANSLATION = | |
'🌍 This MR contains changes in translation files, do not forget to run translation script right before the merge.'; | |
if (danger.git.modified_files.includes(enFile)) { | |
if (!danger.git.modified_files.includes(deFile)) { | |
danger.gitlab.api.MergeRequestDiscussions.all( |
I hereby claim:
To claim this, I am signing this object:
/* | |
Sample Input | |
1 1 1 0 0 0 | |
0 1 0 0 0 0 | |
1 1 1 0 0 0 | |
0 0 2 4 4 0 | |
0 0 0 2 0 0 | |
0 0 1 2 4 0 |
script.js
- код, который обнаруживает, что картинка как минимум на 10% в зоне видимости, и начинает загрузку. Надо положить в /user/js
и в шаблоне включить, например, в layout.tmpl.php
где-то ближе к концу <?php _JS('script'); ?>
Файлы system_neasden_extensions_fotorama.php
, system_neasden_extensions_picture.php
нужно положить/заменить соответствующие файлы в system/neasden/extensions
- fotorama.php
и picture.php
.
Чтобы не заменять файлы полностью, достаточно заменить код возле блоков //CHANGE
picture.php
- заменяем src
на плейсхолдер (надо указать путь к вашей картинке-плейсхолдеру),
а оригинальный путь переносим в атрибут data-src
// ==UserScript== | |
// @name 9gag-pics-only | |
// @namespace https://buznik.net/ | |
// @version 1.0.0 | |
// @description Hide videos and GIFs from 9gag | |
// @author Alex Buznik | |
// @match https://9gag.com/ | |
// @grant none | |
// ==/UserScript== |
git remote prune origin && git remote rm origin
Sometimes when you want to checkout a branch, even though your current branch is clean, you'll get a failed partial checkout, because a file in your current branch will be changed by the new branch (Looking at you .xcodeproj
files). As long as you know your current branch is clean and up-to-date, -f
force the checkout
git checkout -f the_branch
// image width and height | |
var iw = 132; | |
var imageCounter = 0; | |
var x = 0; | |
var y = 0; | |
var ctx = document.getElemenyById('c').getContext('2d'); | |
ctx.fillStyle = "white"; | |
ctx.fillRect(0, 0, 800, 1100); |
app.post('/login', function(req, res) { | |
console.log(res); | |
passport.authenticate('local', function(err, user, params) { | |
if (req.xhr) { | |
//thanks @jkevinburton | |
if (err) { return res.json({ error: err.message }); } | |
// e.g. in auth.js: | |
// if (!user.emailVerified) { return done(null, false, { message: 'Email is not verified. Please check your email for the link.' }); } | |
if (!user && params) { return res.json({error : params.error}); } |