Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Bogdan insane-dev

🎯
Focusing
View GitHub Profile
@roxblnfk
roxblnfk / !index.md
Last active Nov 18, 2021
CYCLE ORM v2 SUMMARY [En]
View !index.md

Cycle ORM V2 (dev)

Gist is dedicated to general changes in Cycle ORM 2.0 in relation to the first version.
It is being developed in the 2.0.x-dev branch and will be updated as updates are made.

Installation:

In the composer.json set the directive minimum-stability: "dev",
then run composer require cycle/orm "2.0.x-dev" (or add by hand).

@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active Jan 27, 2022
How to create an HTTPS certificate for localhost domains
View 2019-https-localhost.md

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@zmts
zmts / tokens.md
Last active Jan 27, 2022
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication
View tokens.md

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@leto
leto / gist:691336b4c14f6e0371d54c1e5ed6476d
Created Aug 3, 2016
onbeforeunload from wordpress plugin
View gist:691336b4c14f6e0371d54c1e5ed6476d
window.onbeforeunload = function(e) {
var e = e || window.event;
if (e) {
e.returnValue = wpp.exit_alert_text;
}
setTimeout( function(){
View yii2-config.md
View html-css.md

HTML + CSS [1 / 4]

Q:

Есть блок с шириной 470px. Нужно вывести в нем список из 9 квадратов зеленого цвета размером 150px * 150px с расстоянием друг от друга по 10px. Схема изображена на рисунке. Использовать нужно приведенный ниже html код. Фактически от вас требуется написать css.

pic

<style>
/* тут будет ваш css код */
@BenMorel
BenMorel / viewport-units-ios.scss
Last active Jan 15, 2022
SCSS mixin to support vh and vw units on all iOS Safari versions. Based on an idea by Patrick Burtchaell's: https://gist.github.com/pburtchaell/e702f441ba9b3f76f587
View viewport-units-ios.scss
/**
* Fix for vw, vh, vmin, vmax on iOS 7.
* http://caniuse.com/#feat=viewport-units
*
* This fix works by replacing viewport units with px values on known screen sizes.
*
* iPhone 6 and 6 Plus cannot run iOS 7, so are not targeted by this fix.
* Target devices running iOS 8+ will incidentally execute the media query,
* but this will still produce the expected result; so this is not a problem.
@lttlrck
lttlrck / gist:9628955
Created Mar 18, 2014
rename git branch locally and remotely
View gist:9628955
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@prime31
prime31 / gist:5675017
Last active Jan 24, 2022
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
View gist:5675017
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array