Skip to content

Instantly share code, notes, and snippets.

View haleyngonadi's full-sized avatar

haley. haleyngonadi

  • Canada
View GitHub Profile
@stancl
stancl / deploy.sh
Last active April 19, 2024 09:39
Deploy using GitHub actions and SSH to a VPS
#!/bin/sh
set -e
vendor/bin/phpunit
npm run prod
git add .
(git commit -m "Build frontend assets for deployment to production") || true
(git push) || true
@ouelletv
ouelletv / socialSharePopups.js
Created August 1, 2018 13:58 — forked from josephabrahams/socialSharePopups.js
Facebook & Twitter Share Popup Windows
export default function() {
document.querySelectorAll('.js-share-facebook-link').forEach(function(el){
el.addEventListener('click', function(e){
var href = e.target.href;
e.preventDefault();
window.open(href, "Facebook", "toolbar=no,location=0,status=no,menubar=no,scrollbars=yes,width=600,height=400,resizable=1");
})
});
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active April 20, 2024 09:46
crack activate Office on mac with license file
@vukanac
vukanac / install-php72-osx.md
Created August 20, 2017 19:26
How to install php72 on Mac OS X with homebrew.

Skip this:

brew tap homebrew/dupes
brew tap homebrew/versions

As:

Warning: homebrew/dupes was deprecated. This tap is now empty as all its formulae were migrated.
Warning: homebrew/versions was deprecated. This tap is now empty as all its formulae were migrated.
@stephanieleary
stephanieleary / blockquote-cite-tinymce.js
Created October 16, 2016 20:01
Blockquote + Cite TinyMCE button JS
(function() {
tinymce.PluginManager.add('blockquote_cite', function( editor, url ) {
editor.addButton( 'blockquote_cite', {
title: 'Blockquote & Cite',
icon: "icon dashicons-testimonial",
onclick: function() {
editor.windowManager.open( {
title: 'Insert Blockquote and Citation',
body: [
{
@JoeSz
JoeSz / change-url-while-scrolling.html
Created September 24, 2016 15:48
Detect element is in the viewport and then change browser url
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Scrolling URL Hash</title>
<meta name="description" content="Webpage for xxxx">
<style>
body {
height: 2000px;
}
@devinsays
devinsays / combine-menus.php
Created November 13, 2015 18:09
Combines two WordPress menus into one.
<?php
/**
* Combines the markup of two menu areas into one.
*/
// Get the markup list items in the first menu.
$menu = wp_nav_menu( array(
'theme_location'=> 'menu-1',
'fallback_cb' => false,
'container' => '',
@vankasteelj
vankasteelj / sec2time.js
Last active February 2, 2024 11:08
Javascript - Seconds to Time (hh:mm:ss,ms) -> sec2time(593.685038) becomes 00:09:53,685
function sec2time(timeInSeconds) {
var pad = function(num, size) { return ('000' + num).slice(size * -1); },
time = parseFloat(timeInSeconds).toFixed(3),
hours = Math.floor(time / 60 / 60),
minutes = Math.floor(time / 60) % 60,
seconds = Math.floor(time - minutes * 60),
milliseconds = time.slice(-3);
return pad(hours, 2) + ':' + pad(minutes, 2) + ':' + pad(seconds, 2) + ',' + pad(milliseconds, 3);
}
@lorenzo
lorenzo / file.ctp
Last active October 29, 2015 08:09
<?php
$this->Html->link($artist->name, ['action' => 'view', $artis->id, 'name' => $artist->name]);
@gabskoro
gabskoro / Icon meta tags
Last active April 8, 2024 09:42
Adding meta tag informations for Chrome, iOS and Windows
<!-- http://realfavicongenerator.net -->
<!-- Chrome -->
<!-- https://developer.chrome.com/multidevice/android/installtohomescreen -->
<link rel="manifest" href="/manifest.json">
{
"short_name": "Maps",
"name": "Google Maps",
"icons": [
{