Skip to content

Instantly share code, notes, and snippets.

View jvmonjo's full-sized avatar
👨‍💻
Trying not to work too much

Josep jvmonjo

👨‍💻
Trying not to work too much
View GitHub Profile
@jvmonjo
jvmonjo / mac terminal theme customize mac os terminal command line zsh.md install oh my zsh on macos | change terminal theme on macos | Change console theme on macos

How to customize mac os terminal using oh my zsh

Step1: download & install oh-my-zsh via curl

  • sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Note: if you already have folder then delete it running rm -r /Users/rupeshti/.oh-my-zsh

Step2 Open Zshrc file

<?php
/**
* The template for displaying Comments.
*
* The area of the page that contains comments and the comment form.
*
* @package WordPress
* @subpackage theme
* @since theme 0.1.0
*/
@jvmonjo
jvmonjo / Localhost Wordpress Permissions
Created August 9, 2019 15:31 — forked from shawnrgrimes/Localhost Wordpress Permissions
Enable updating WordPress in a local environment on OS X (Updates, Themes and Plugins)
On Mac OS X (Leopard+), the Apache HTTP Server runs under the user account, _www which belongs to the group _www. To allow WordPress to configure wp-config.php during installation, update files during upgrades, and update the .htaccess file for pretty permalinks, give the server write permission on the files.
One way to do this is to change the owner of the wordpress directory and its contents to _www. Keep the group as staff, a group to which your user account belongs and give write permissions to the group.
$ cd /<wherever>/Sites/<thesite>
$ sudo chown -R _www wordpress
$ sudo chmod -R g+w wordpress
This way, the WordPress directories have a permission level of 775 and files have a permission level of 664. No file nor directory is world-writeable.
@jvmonjo
jvmonjo / gist:fcb61e741ff08cc2604714e3899d0f5b
Created December 6, 2018 11:33
Obtenir cookie de google maps location sharing
git clone https://github.com/costastf/locationsharinglib.git
cd locationsharinglib/
mkvirtualenv -p `which python3` locationsharinglib
pip install -r requirements.txt
python cli.py --email '<your email>' --password '<your password>' --cookies-file .google_maps_location_sharing.cookies
@jvmonjo
jvmonjo / graphql-axios.js
Created January 18, 2018 19:22 — forked from bjunc/graphql-axios.js
application/graphql vs application/json using axios
let input = { first_name: 'Foo', last_name: 'Bar' };
// application/graphql example
/* eslint-disable no-unused-vars */
let configGraphQL = {
url: '/graphql',
method: 'post',
headers: { 'Content-Type': 'application/graphql' },
data: `mutation { user(id: 1, input: ${ JSON.stringify(input) }){ full_name } }`
};
@jvmonjo
jvmonjo / countries.json
Created October 15, 2017 16:07 — forked from keeguon/countries.json
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},

##Readme

Add yourself to the www-data group and set the setgid bit on the /var/www directory such that all newly created files inherit this group as well.

sudo gpasswd -a "$USER" www-data Correct previously created files (assuming you to be the only user of /var/www):

sudo chown -R "$USER":www-data /var/www find /var/www -type f -exec chmod 0660 {} ; sudo find /var/www -type d -exec chmod 2770 {} ;

@jvmonjo
jvmonjo / repeat-collapse-snippet.html
Created March 10, 2017 14:19 — forked from vtellier/repeat-collapse-snippet.html
Polymer iron-collapse with dom-repeat snippet
<link rel="import" href="../../bower_components/iron-icons/iron-icons.html">
<link rel="import" href="../../bower_components/iron-icon/iron-icon.html">
<link rel="import" href="../../bower_components/iron-collapse/iron-collapse.html">
<dom-module id="your-element">
<template>
<style>
.heading {
padding: 10px 15px;
if(typeof arrayName[index] === 'undefined') {
// does not exist
}
else {
// does exist
}
/* Add blur_module to Text Module Settings > Custom CSS > CSS Class,
or blur_background_module to Section Module Settings > Custom CSS > CSS Class */
.blur_module,
.blur_background_module {
background-position: top center;
background-repeat: repeat;
display: block;
overflow: hidden;
position: relative;
}