Skip to content

Instantly share code, notes, and snippets.

Max Bratsun bratsun

Block or report user

Report or block bratsun

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
bratsun / change_wp_pass
Created Mar 7, 2017
Change admin password
View change_wp_pass
use wp_genesis;
SELECT ID, user_login, user_pass FROM wp_users;
UPDATE wp_users SET user_pass = MD5('TEST') WHERE ID=1 LIMIT 1;
View mysql_import
mysql -u username -p
use database_name;
SOURCE /path/to/sql/file.sql
show tables;
select * from table;
bratsun / undo_update
Last active Feb 7, 2017
update node.js on Ubuntu
View undo_update
sudo apt-get install --reinstall nodejs-legacy # fix /usr/bin/node
sudo n rm 6.0.0 # replace number with version of Node that was installed
sudo npm uninstall -g n
bratsun / simple_arrow.sass
Last active Jan 4, 2017
Simple css arrow for next link
View simple_arrow.sass
text-transform: uppercase;
font-size: 13px;
position: relative;
margin-top: 25px;
display: inline-block;
&:after {
position: relative;
top: -2px;
View prefixer.sass
@mixin prefix($property, $value, $prefixes: ()) {
@each $prefix in $prefixes {
#{'-' + $prefix + '-' + $property}: $value;
// Output standard non-prefixed declaration
#{$property}: $value;
View default_transition.sass
svg path,
svg polygon{
@include prefix(transition, all 200ms cubic-bezier(0.025, 0.185, 0.000, 0.590), webkit moz ms o);
@include prefix(transition-timing-function, cubic-bezier(0.025, 0.185, 0.000, 0.590), webkit moz ms o);
bratsun / linear_gradient.sass
Created Oct 11, 2016
Linear gradient mixin
View linear_gradient.sass
@mixin linear-gradient($direction, $color-stops...) {
// Direction has been omitted and happens to be a color-stop
@if is-direction($direction) == false {
$color-stops: $direction, $color-stops;
$direction: 180deg;
background: nth(nth($color-stops, 1), 1);
background: -webkit-linear-gradient($direction, $color-stops);
background: linear-gradient($direction, $color-stops);
bratsun / radial_gradient.sass
Created Oct 11, 2016
Radial gradient mixin
View radial_gradient.sass
@mixin radial-gradient($from, $to) {
background: -moz-radial-gradient(center, circle cover, $from 0%, $to 100%);
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, $from), color-stop(100%, $to));
background: -webkit-radial-gradient(center, circle cover, $from 0%, $to 100%);
background: -o-radial-gradient(center, circle cover, $from 0%, $to 100%);
background: -ms-radial-gradient(center, circle cover, $from 0%, $to 100%);
background: radial-gradient(center, circle cover, $from 0%, $to 100%);
background-color: $from;
View entity_routing.php
// create and save
$entity = Entity::create($values);
$entity = Entity::load($id);
$entities = Entity::loadMultiple($ids);
$entity_id = $entity->id();
$bundle = $entity->bundle();
bratsun / check_options_bundle_type_add_container.twig
Created Oct 11, 2016
Check options array, bundle type, and add container class
View check_options_bundle_type_add_container.twig
{% if 'full-width' not in options and bundle != 'fullcta' and bundle != 'home_intro' %}
{% set container = 'container' %}
{% endif %}
You can’t perform that action at this time.