Skip to content

Instantly share code, notes, and snippets.

@prebrov
prebrov / LICENSE
Created March 1, 2021 02:26 — forked from brianbruggeman/LICENSE
Convert Viscosity to Open VPN
Public Domain
#!/bin/sh
##
# Run this script with Synology Task Scheduler:
# Settings > Task Scheduler > Create > Scheduled Task > User-defined script
# Name: LE Wildcard Cert copy
# User: root
# Schedule: Repeat Monthly
# User-defined script: See below.
#
# Based on:
import os
import argparse
from twilio.rest import Client
# Load .env file and overwrite existing environment vars if they exist
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv(), override=True)
# Your Account Sid and Auth Token from twilio.com/console
account_sid = os.getenv("TWILIO_ACCOUNT_SID")
@prebrov
prebrov / env.py
Created July 27, 2018 21:33 — forked from lethee/env.py
Sublime Text 3: Apply NVM environment
# Save this file
# mac - "~/Library/Application Support/Sublime Text 3/Packages/"
# linux - "~/.config/sublime-text-3/Packages/"
# NOTE!
# ~/.nvm/alias/default must contain full version name.
# $ nvm alias default v4.3.5
import os
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, json
import requests
# Configure variables
ACCOUNT_SID = 'AC*********************'
AUTH_TOKEN = '***********************'
FLOW_SID = 'FW**********************'
@prebrov
prebrov / message_list.py
Last active October 26, 2017 07:17
[Twilio] Dump a Message log from a specified date till now into a CSV
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import settings
from twilio.rest import Client
import csv, datetime
# put your own credentials here
account_sid = 'YOUR TWILIO ACCOUNT SID'
auth_token = 'YOUR TWILIO AUTH TOKEN'
#!/bin/bash
# Get Homebrew in the new location
git clone git@github.com:Homebrew/homebrew.git ~/Homebrew
# Move all your installed packages to the new location
mv /usr/local/Cellar ~/Homebrew/Cellar
mv /usr/local/Library ~/Homebrew/Library
# Remove "root" directory files left behind
rm -rf /usr/local/.git /usr/local/{.gitignore,.yardopts,CODEOFCONDUCT.md,CONTRIBUTING.md,LICENSE.txt,README.md,SUPPORTERS.md}
@prebrov
prebrov / craft.conf
Created September 28, 2015 04:59 — forked from kenzie/craft.conf
Nginx virtual host configuration for Craft CMS, PHP5-FPM, NGINX 1.2.1 and craft/config/general.php for friendly URLs.
server {
listen 80;
root /var/www/craft.dev/public;
index index.php index.html index.htm;
server_name craft.dev;
location / {
try_files $uri $uri/ @rewrites;
@prebrov
prebrov / button.html
Last active August 28, 2015 00:47 — forked from dmlap/button.html
Custom button HTML
<div class="vjs-playback-rate-button vjs-menu-button vjs-control" role="button" aria-live="polite" tabindex="0" aria-haspopup="true" aria-label="Playback Rate Menu">
<div class="vjs-control-content">
<span class="vjs-control-text">1x</span>
<div class="vjs-menu">
<ul class="vjs-menu-content">
<li class="vjs-menu-item" role="button" aria-live="polite" tabindex="0" aria-selected="true">0.5x</li>
<li class="vjs-menu-item vjs-selected" role="button" aria-live="polite" tabindex="0" aria-selected="true">1x</li>
<li class="vjs-menu-item" role="button" aria-live="polite" tabindex="0" aria-selected="true">1.5x</li>
<li class="vjs-menu-item" role="button" aria-live="polite" tabindex="0" aria-selected="true">2.0x</li>
</ul>
@prebrov
prebrov / dynamic-ads.js
Last active August 28, 2015 00:47 — forked from dmlap/dynamic-ads.js
Dynamically configuring the ad server URL for the Brightcove Player.
/**
* PLUGIN CODE
*/
// create a simple javascript plugin that gets the current video ID and sets up ads:
videojs.plugin('setupAds', function() {
'use strict';
var player = this,
currentVideoId = player.el().getAttribute('data-video-id');
player.ima3({