Skip to content

Instantly share code, notes, and snippets.

View ivanderbu2's full-sized avatar

Ivan Radunovic ivanderbu2

View GitHub Profile
@ivanderbu2
ivanderbu2 / build-deploy-theme.yml
Created August 4, 2022 08:23
Build & Deploy WordPress theme GitHub Action
# Basic workflow to build and deploy WordPress theme or plugin
name: CD
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master" ]
pull_request:
@ivanderbu2
ivanderbu2 / calculate-utc-offset-dst.php
Created February 18, 2018 17:50 — forked from glueckpress/calculate-utc-offset-dst.php
Calculate a timezone’s offset to UTC considering daylight savings time (e.g. CEST), print a string like “UTC+2” or “UTC-9”
<?php
/**
* Prints a string showing current time zone offset to UTC, considering daylight savings time.
* @link http://php.net/manual/en/timezones.php
* @param string $time_zone Time zone name
* @return string Offset in hours, prepended by +/-
*/
function ch150918__utc_offset_dst( $time_zone = 'Europe/Berlin' ) {
// Set UTC as default time zone.
@ivanderbu2
ivanderbu2 / btc-eth-dca-buy.php
Created September 7, 2017 17:17 — forked from levelsio/btc-eth-dca-buy.php
This script runs daily and "Dollar Cost Average"-buys $40 BTC and $10 ETH per day
<?
//
// [ BUY BTC & ETH DAILY ON BITSTAMP ]
// by @levelsio
//
// 2017-08-23
//
// 1) buy $40/day BTC
// 2) buy $10/day ETH
//
@ivanderbu2
ivanderbu2 / introrx.md
Created December 18, 2016 13:25 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
'google' => [
'client_id' => env('GOOGLE_ID'),
'client_secret' => env('GOOGLE_SECRET'),
'redirect' => env('GOOGLE_REDIRECT')
],
'github' => [
'client_id' => env('GITHUB_ID'),
'client_secret' => env('GITHUB_SECRET'),
'redirect' => env('GITHUB_REDIRECT')
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-6">
<a href="{{ route('social.redirect', ['provider' => 'google']) }}" class="btn btn-lg waves-effect waves-light btn-block google">Google+</a>
</div>
<div class="col-md-6 col-sm-6 col-xs-6">
<a href="{{ route('social.redirect', ['provider' => 'github']) }}" class="btn btn-lg waves-effect waves-light btn-block github">GitHub</a>
</div>
</div>
@ivanderbu2
ivanderbu2 / 00.howto_install_phantomjs.md
Created October 12, 2016 20:28 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev