// jQuery
$(document).ready(function() {
// code
})
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Roskis | |
* | |
* Adds custom trash view that can be also accessed by defined roles | |
* Pages in trash can be searched, sorted and restored. | |
* | |
* | |
* Copyright 2013 by Antti Peisa |
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
This solution fixes the error caused by trying to run npm update npm -g
. Once you're finished, you also won't need to use sudo
to install npm modules globally.
Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$field = $fields->get("field_name_here"); // Insert system field i.e. roles | |
$field->flags = Field::flagSystemOverride; | |
$field->flags = 0; | |
$field->save(); |
install the normal way:
wget https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.7.2-omnibus.5.4.2.ci-1_amd64.deb & > /dev/null
sudo apt-get update
sudo apt-get upgrade
This will take filePath
as a function parameter and reads the file via fs
module and get the file and converts it's size into more humanly readable format.
function getFileSize(filePath) {
var stats = fs.statSync(filePath);
// console.log('stats', stats);
var size = stats["size"];
// convert it to humanly readable format.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getUrlParams(search) { | |
let hashes = search.slice(search.indexOf('?') + 1).split('&') | |
let params = {} | |
hashes.map(hash => { | |
let [key, val] = hash.split('=') | |
params[key] = decodeURIComponent(val) | |
}) | |
return params | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getUrlParams = (search = ``) => { | |
const hashes = search.slice(search.indexOf(`?`) + 1).split(`&`) | |
return hashes.reduce((acc, hash) => { | |
const [key, val] = hash.split(`=`) | |
return { | |
...acc, | |
val: decodeURIComponent(val) | |
} | |
}, {}) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// The STRIPE-supported currencies, sorted by code | |
export const currencies = [ | |
{ | |
'code':'AED', | |
'description':'United Arab Emirates Dirham' | |
}, | |
{ | |
'code':'AFN', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Version key/value should be on his own line | |
PACKAGE_VERSION=$(cat package.json \ | |
| grep version \ | |
| head -1 \ | |
| awk -F: '{ print $2 }' \ | |
| sed 's/[",]//g') | |
echo $PACKAGE_VERSION |
OlderNewer