Skip to content

Instantly share code, notes, and snippets.

View itsmikita's full-sized avatar
💭
Jemanden passiert etwas

It's Mikita itsmikita

💭
Jemanden passiert etwas
View GitHub Profile
@itsmikita
itsmikita / user-settings.json
Last active January 28, 2021 06:04
Visual Studio Code Custom Settings
{
"editor.matchBrackets": "always",
"workbench.colorTheme": "Framer Syntax",
"workbench.iconTheme": "macos-modern-minimal-mono-icon-theme",
"editor.cursorStyle": "block",
"editor.fontSize": 15,
"editor.fontFamily": "JetBrains Mono",
"editor.fontWeight": "normal",
"editor.fontLigatures": "'zero'",
"editor.tabSize": 2,
@itsmikita
itsmikita / intersect.js
Last active August 17, 2020 18:23
Insersection Observer API
( function() {
if( ( "undefined" !== typeof window.orientation ) || ( -1 !== navigator.userAgent.indexOf( "IEMobile" ) ) ) {
window.addEventListener( "load", function() {
var elements = document.querySelectorAll( ".people-item" );
var observer = new IntersectionObserver( function( entries ) {
entries.forEach( function( entry ) {
if( entry.isIntersecting ) {
entry.target.classList.add( "intersecting" );
}
else {
@itsmikita
itsmikita / functions.php
Created May 14, 2019 11:46
Create new Admin user in WordPress
<?php
/**
* Creates new user with Administrator capabilities
*
* Put this code snippet to your theme's functions.php
* and change $username, $password and $email. The code
* checks if $username does not exist and creates a new
* user.
*
@itsmikita
itsmikita / README.md
Last active April 10, 2019 12:27
Install PHP 7.2.15 on Mac OSX El Captain 10.11.6

Install PHP 7.2.15 on Mac OSX El Captain 10.11.6

I made this self-reminder public for anyone who need PHP7+ running on older Macs, since I had to do some shaman things to make it work.

  1. Install Homebrew and ignore all the warnings that your Mac OSX is outdated, just follow the instuctions here:

https://github.com/Homebrew/brew

@itsmikita
itsmikita / __any_keys_exist.php
Created April 8, 2019 11:12
Missing PHP helper methods __keys_exist( $keys, $array ) and __any_keys_exist( $keys, $array )
/**
* Check ANY keys exist in an array
*
* @param $keys
* @param $array
*/
function __any_keys_exist( $keys, $array )
{
foreach( $keys as $key ) {
if( isset( $array[ $key ] ) {
@itsmikita
itsmikita / keymap.cson
Created June 6, 2018 10:48
Atom IDE Custom Key Mappings
# 'R' - to rename/move file/folder in the Tree View
'.tree-view':
'r': 'tree-view:rename'
@itsmikita
itsmikita / styles.less
Last active September 3, 2018 19:51
Atom IDE Custom Styles
// UI Fonts
@ui-font-family: "IBM Plex Sans", "SF Pro Text", sans-serif;
@ui-font-size: 12px;
@editor-font-family: "IBM Plex Mono Zero", "SF Mono", monospace;
@editor-font-size: 14px;
@editor-line-height: 20px;
// Colors
@color-black: #111;
@color-blue: #007aff; // #4d78cc;
@itsmikita
itsmikita / cookie.js
Created May 22, 2018 11:00
JavaScript Cookies Wrapper
@itsmikita
itsmikita / hhvm.ini
Created May 22, 2018 09:09
Local development with PHP and Proxygen on MacOS
; Disable <?hh
hhvm.hack.lang.look_for_typechecker = false
; Enable all PHP7 features
hhvm.php7.all = true
; Disable caching for static files
hhvm.server.expires_default = 1
; Make errors pointing to index.php
@itsmikita
itsmikita / package.json
Last active April 18, 2019 10:59
JS+PHP Local development package scripts (NOTE: No SSL support for PHP)
{
"name": "",
"description": "",
"version": "",
"private": true,
"author": "Mikita Stankiewicz",
"scripts": {
"server": "php -S 127.0.0.1:8888 -t ./api/public",
"client": "webpack-dev-server --open",
"start": "npm run server",