We should have at least three files: 'Widget.svelte', 'rollup.config.js' and 'package.json':
- Our widget
Widget.svelte
:
<script>
export let name;
</script>
<h1>Hello {name}!</h1>
#!/bin/bash | |
USERNAME=$1 | |
HOSTNAME=$(hostname --fqdn) | |
qrencode -t ANSI256 -o - $(echo otpauth://totp/$USERNAME@$HOSTNAME?secret=$(oathtool --totp -v $(grep $USERNAME /etc/users.oath | cut -f 4) | grep Base32 | cut -d " " -f 3)) |
We should have at least three files: 'Widget.svelte', 'rollup.config.js' and 'package.json':
Widget.svelte
:<script>
export let name;
</script>
<h1>Hello {name}!</h1>
#!/usr/bin/env bash | |
# | |
# Script to remove GPG key from git-crypt | |
# | |
# It will re-initialize git-crypt for the repository and re-add all keys except | |
# the one requested for removal. | |
# | |
# Note: You still need to change all your secrets to fully protect yourself. | |
# Removing a user will prevent them from reading future changes but they will | |
# still have a copy of the data up to the point of their removal. |
#!/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |
function declOfNum(number, titles) { | |
cases = [2, 0, 1, 1, 1, 2]; | |
return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ]; | |
} | |
use: | |
declOfNum(count, ['найдена', 'найдено', 'найдены']); |
const gulp = require('gulp'); | |
const Builder = require('gulp-bem-bundle-builder'); | |
const bundler = require('gulp-bem-bundler-fs'); | |
const nodemon = require('gulp-nodemon'); | |
const merge = require('merge2'); | |
const debug = require('gulp-debug'); | |
const babel = require('gulp-babel'); | |
const uglify = require('gulp-uglify'); | |
const gulpif = require('gulp-if'); | |
const concat = require('gulp-concat'); |
Я также спросил это на GitHub. Предположим, есть компоненты Signin
и Signup
. Они близнецы:
Signup:
<main>
<h1 className={styles.h1}>Sign Up</h1>
<script type="text/javascript"> | |
window.onscroll = scroll; | |
function scroll () { | |
var scrollTop = window.pageYOffset; | |
console.log(scrollTop); | |
if( scrollTop > 363 ){ | |
document.getElementById('summary').style.top="20px"; | |
document.getElementById('summary').style.position="fixed"; | |
} | |
else |
<?php | |
/* | |
Output filter to retrieve names of TVs from a list of TV ids | |
[email protected] | |
Idea: | |
Use it with toogleTVSet plugin (included below) to handel different template options. | |
Usage: |