Skip to content

Instantly share code, notes, and snippets.

Bakyt 2bj

Block or report user

Report or block 2bj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View admin-blocks-slider.blade.php
///views/admin/blocks/slider.blade.php
@formField('repeater', ['type' => 'slider_item'])
@formField('input', [
'name' => 'rotate_speed',
'label' => 'Rotate Speed',
'note' => 'Define in miliseconds'
])
@2bj
2bj / homebrew-permissions.sh
Created Feb 17, 2019 — forked from jrenggli/homebrew-permissions.sh
Fix homebrew permissions
View homebrew-permissions.sh
sudo chown -R $(whoami) /usr/local/Cellar
sudo chown -R $(whoami) /usr/local/Homebrew
sudo chown -R $(whoami) /usr/local/var/homebrew
sudo chown -R $(whoami) ${HOME}/Library/Caches/Homebrew
sudo chown -R $(whoami) ${HOME}/Library/Logs/Homebrew
sudo chown -R $(whoami) /usr/local/etc
sudo chown -R $(whoami) /usr/local/opt
sudo chown -R $(whoami) /usr/local/bin
sudo chown -R $(whoami) /usr/local/var
sudo chown -R $(whoami) /usr/local/share/man/man1
@2bj
2bj / how-to-set-up-stress-free-ssl-on-os-x.md
Created Jan 28, 2019 — forked from jed/how-to-set-up-stress-free-ssl-on-os-x.md
How to set up stress-free SSL on an OS X development machine
View how-to-set-up-stress-free-ssl-on-os-x.md

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@2bj
2bj / metro.sql
Created Oct 10, 2017 — forked from anonymous/metro.sql
Таблица станций московского метро
View metro.sql
-- phpMyAdmin SQL Dump
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
@2bj
2bj / mobile_codes.ru.js
Last active Apr 8, 2017
Коды сотовых операторов РФ
View mobile_codes.ru.js
const codes = [
900, 901, 902, 903, 904, 905, 906, 908, 909, 910, 911, 912, 913, 914, 915,
916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930,
931, 932, 933, 934, 936, 937, 938, 939, 941, 950, 951, 952, 953, 958, 960,
961, 962, 963, 964, 965, 966, 967, 968, 969, 977, 978, 980, 981, 982, 983,
984, 985, 986, 987, 988, 989, 991, 992, 993, 994, 995, 996, 999
];
@2bj
2bj / YandexMap.vue
Created Mar 22, 2017 — forked from reg2005/YandexMap.vue
YandexMap wrapper for VueJS 2
View YandexMap.vue
<template>
<div class="col-xs-12" style="padding:0;">
<div class="panel panel-default" style="margin:0;">
<div class="panel-body" style="padding:0;">
<div v-if="maps.length" :style="{height: height + 'px'}" id="map"></div>
<h3 v-else class="text-center">Нет точек</h3>
</div>
</div>
</div>
</template>
View Preferences.sublime-settings
{
"always_show_minimap_viewport": false,
"bold_folder_labels": false,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"folder_exclude_patterns":
[
".idea",
".git"
],
"caret_style": "phase",
View homebrew_multiple_mysql_versions.md

Multiple MySQL Versions with Homebrew

For homebrew version 0.9.5.

brew -v # => Homebrew 0.9.5

Install the current version of mysql.

# Install current mysql version
brew install mysql
You can’t perform that action at this time.