Skip to content

Instantly share code, notes, and snippets.

View ramzs's full-sized avatar

Roman Sekachev ramzs

View GitHub Profile
const SHEET_NAME = "Копилка челлендж";
const TABLE_RANGE = "A2:E27";
const SHEET = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(SHEET_NAME);
const PAYMENT_MESSAGES = {
0: "Напоминалка: сегодня тебе надо внести %amount₽ в копилку для челленджа",
1: "Напоминалка: завтра тебе надо внести %amount₽ в копилку для челленджа",
}
class Payment {
constructor(date, week, amount, paid) {
@ramzs
ramzs / micromodal.css
Created December 14, 2021 11:55 — forked from ghosh/micromodal.css
Demo modal styles for micromodal.js and corresponding expected html. If using this, set the `awaitCloseAnimation` in config to true
/**************************\
Basic Modal Styles
\**************************/
.modal {
font-family: -apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif;
}
.modal__overlay {
position: fixed;
@ramzs
ramzs / function.php
Created February 12, 2021 12:08 — forked from Umbrous/function.php
Динамическая подгрузка постов wordPress
function true_load_posts(){
$args = unserialize(stripslashes($_POST['query']));
$args['paged'] = $_POST['page'] + 1; // следующая страница
$args['post_status'] = 'publish';
$q = new WP_Query($args);
if( $q->have_posts() ):
while($q->have_posts()): $q->the_post();
/*
* Со строчки 13 по 27 идет HTML шаблон поста, максимально приближенный к теме TwentyTen.
@ramzs
ramzs / daylist
Last active January 15, 2020 17:54 — forked from kythin/daylist
Наполнение для select Дни, Месяцы, Года
<select name="dob-day" class="datefield day">
<option value="">Day</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
@ramzs
ramzs / nodejs-gulp-install.txt
Created December 12, 2018 10:32 — forked from agragregra/nodejs-gulp-install.txt
Node.js + Gulp installation (Ubuntu) one line command
1. Simple (Node.js LTS, Gulp, rimraf, NCU):
sudo apt-add-repository -y ppa:brightbox/ruby-ng; sudo apt-get update; sudo apt-get -y install curl; curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -; sudo apt-get -y install nodejs; sudo npm i -g gulp rimraf npm-check-updates bower; sudo chown -R $USER:$(id -gn $USER) /home/$USER/.config
2. Advanced (Node.js LTS, Gulp, rimraf, NCU, Ruby, Jekyll, Jekyll paginate)
sudo apt-add-repository -y ppa:brightbox/ruby-ng; sudo apt-get update; sudo apt-get -y install curl ruby2.5 ruby2.5-dev gcc make g++ libffi-dev; curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -; sudo apt-get -y install nodejs; sudo gem i jekyll; sudo gem i jekyll-paginate-v2; sudo npm i -g gulp rimraf npm-check-updates bower; sudo chown -R $USER:$(id -gn $USER) /home/$USER/.config
3. Длинна командной строки (добавить PROMPT_DIRTRIM=3 в конец и сохранить файл):
sudo nano ~/.bashrc
PROMPT_DIRTRIM=3
@ramzs
ramzs / gist:ca189e7f81b37f2abfc7d975fc215091
Created May 13, 2017 16:16 — forked from keltanas/gist:3499449
Плагин для twitter bootstrap, открывает dropdown меню при наведении, если оно находится внутри navbar
/**
* Плагин для twitter bootstrap, открывает dropdown меню при наведении, если оно находится внутри navbar
* <div class="navbar" id="menu1">...</div>
* <script type="javascript">$(document).ready(function(){
* $('#menu1').dropdownMouse()
* });</script>
* @return {*}
*/
$.fn.dropdownMouse = function()
{
@ramzs
ramzs / styles.css
Created April 12, 2017 18:47 — forked from pburtchaell/styles.css
VH and VW units can cause issues on iOS devices. To overcome this, create media queries that target the width, height, and orientation of iOS devices.
/**
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units
*
* To overcome this, create media queries that target the width, height, and orientation of iOS devices.
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing
* the height of element `.foo` —which is a full width and height cover image.
*
* iOS Resolution Quick Reference: http://www.iosres.com/
*/
@ramzs
ramzs / masonry_imageloaded.js
Created November 7, 2016 19:27 — forked from agragregra/masonry_imageloaded.js
Masonry imagesLoaded
var $container = $(".masonry-container");
$container.imagesLoaded(function () {
$container.masonry({
columnWidth: ".item",
itemSelector: ".item"
});
});
@ramzs
ramzs / scifi.html
Last active January 10, 2016 16:08 — forked from anonymous/scifi.html
Задание для https://goo.gl/WGrXbu
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Sci-Fi</title>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://fb.me/react-0.14.3.js"></script>
<script src="https://fb.me/react-dom-0.14.3.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script>
</head>