Skip to content

Instantly share code, notes, and snippets.

View vvasilev-'s full-sized avatar

Viktor Vasilev vvasilev-

View GitHub Profile
@vvasilev-
vvasilev- / buzz-player.js
Created July 6, 2012 07:26
mini audio player with Buzz.js
// constructor
var Player = function(source){
// cache vars
this.sound = new buzz.sound(source.split('.')[0], { formats: ['ogg', 'mp3'], volume: 100 });
this.$playBtn = $('.ui-page-active .jp-play');
this.$pauseBtn = $('.ui-page-active .jp-pause');
this.$rewindBtn = $('.ui-page-active .rewind');
this.$duration = $('.ui-page-active .jp-duration');
this.$seekBar = $('.ui-page-active .jp-seek-bar');
@vvasilev-
vvasilev- / ssl.md
Last active August 29, 2015 14:15
Self-Signed SSL with Apache 2.2 & Laravel on Windows
var Dialog = React.createClass({
render: function() {
// 1) render nothing, this way the DOM diff will never try to do
// anything to it again, and we get a node to mess with
return React.DOM.div();
},
componentDidMount: function() {
// 2) do DOM lib stuff
this.node = this.getDOMNode();
#!/bin/sh
# Scripts to manage github pages deployment using a 'distribution' directory
# Ref: http://www.damian.oquanta.info/posts/one-line-deployment-of-your-site-to-gh-pages.html
# https://gist.github.com/cobyism/4730490
#
# This script assumes '${TARGET_DEPLOYMENT_BRANCH}' branch is the target deployment branch
# note: in the case of standard github pages, this is is 'gh-pages')
# note: in the case of a user github pages, this is is 'master')
# This script will deploy the CURRENT branch to the target branch
set -o
<h1>Header 1</h1>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod bibendum ultricies, dolor erat imperdiet sem, quis elementum elit ipsum ut turpis. In vel ante metus ut volutpat gravida, magna ante euismod velit, vel venenatis turpis turpis sit amet dui.
<h2>Header 2</h2>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod bibendum ultricies, dolor erat imperdiet sem, quis elementum elit ipsum ut turpis. In vel ante metus ut volutpat gravida, magna ante euismod velit, vel venenatis turpis turpis sit amet dui.
<h3>Header 3</h3>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod bibendum ultricies, dolor erat imperdiet sem, quis elementum elit ipsum ut turpis. In vel ante metus ut volutpat gravida, magna ante euismod velit, vel venenatis turpis turpis sit amet dui.
<h4>Header 4</h4>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod bibendum ultricies, dolor erat
config.vm.provision "shell", inline: <<-SHELL
echo "Preparing local node_modules folder…"
mkdir /vagrant_node_modules
chown vagrant:vagrant /vagrant_node_modules
SHELL
config.vm.provision "shell", run: "always", inline: <<-SHELL
mount --bind /vagrant_node_modules /vagrant/node_modules
SHELL
@vvasilev-
vvasilev- / axios-interceptors-refresh-token.js
Created May 4, 2018 09:48 — forked from mkjiau/axios-interceptors-refresh-token.js
Axios interceptors for token refreshing and more than 2 async requests available
let isRefreshing = false;
let refreshSubscribers = [];
const instance = axios.create({
baseURL: Config.API_URL,
});
instance.interceptors.response.use(response => {
return response;
}, error => {
<x-mj-app>
<x-slot:nav>
<x-mj-vertical-stack justify="between">
<x-mj-profile-card />
<x-mj-vertical-stack gap="1">
<x-mj-global-nav />
<x-mj-side-nav title="My Mailboxes">
<x-mj-side-nav-link count="128">
@vvasilev-
vvasilev- / caddy-vapor-ssl.sh
Created March 19, 2024 09:02 — forked from HelgeSverre/caddy-vapor-ssl.sh
Updated: Unlimited SSL Domain on Laravel Vapor
# Stop and disable NGINX
sudo systemctl stop nginx
sudo systemctl disable nginx
# Install Go
wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz
rm -f go1.20.2.linux-amd64.tar.gz