Skip to content

Instantly share code, notes, and snippets.

View jrran90's full-sized avatar
🎯
Learn. Un-learn. Re-learn

Jhon jrran90

🎯
Learn. Un-learn. Re-learn
View GitHub Profile
@jrran90
jrran90 / Random-string
Created July 6, 2018 14:16 — forked from 6174/Random-string
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
@jrran90
jrran90 / CountdownTimer.vue
Last active January 17, 2019 05:06
Create a countdown timer using VueJS 2
<template>
<div>
<div class="the-countdown">
<ul>
<li>
<div>
<span>Days</span>
{{ days | two_digits }}
</div>
</li>
@jrran90
jrran90 / GetWeeksInMonth.js
Created March 22, 2019 09:27 — forked from markthiessen/getWeeksInMonth.js
JavaScript - get weeks in a month as array of start and end days
//note: month is 0 based, just like Dates in js
function getWeeksInMonth(month, year){
var weeks=[],
firstDate=new Date(year, month, 1),
lastDate=new Date(year, month+1, 0),
numDays= lastDate.getDate();
var start=1;
var end=7-firstDate.getDay();
while(start<=numDays){
@jrran90
jrran90 / media-query.css
Created May 14, 2019 10:25 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@jrran90
jrran90 / MySQLCheatSheet.md
Last active November 14, 2019 01:54
MySQL Cheatsheet

MySQL CheatSheet

This can be viewed thru mysql help or if using linux, try man mysql

ego          (\G) Send command to mysql server, display result vertically.
@jrran90
jrran90 / PrestaShopCheatSheet.md
Last active November 14, 2019 02:54
PrestaShop CheatSheet and resolved

When you're doing migration from a different server and domain make sure you change the value of the following tables:

ps_configuration
--------------------
PS_SHOP_DOMAIN
PS_SHOP_DOMAIN_SSL
@jrran90
jrran90 / wordpress-plugin-svn-to-git.md
Created November 27, 2019 03:39 — forked from kasparsd/wordpress-plugin-svn-to-git.md
Using Git with Subversion Mirroring for WordPress Plugin Development
@jrran90
jrran90 / detect-user-agent.md
Created November 27, 2019 12:58
Detect user agent

This will detect if it's using mobile or not

if (navigator.userAgent.match(/Android/i) 
  || navigator.userAgent.match(/webOS/i) 
  || navigator.userAgent.match(/iPhone/i)  
  || navigator.userAgent.match(/iPad/i)  
  || navigator.userAgent.match(/iPod/i) 
  || navigator.userAgent.match(/BlackBerry/i) 
 || navigator.userAgent.match(/Windows Phone/i)) { 
@jrran90
jrran90 / setUserAgent.js
Created November 28, 2019 12:01 — forked from thorsten/setUserAgent.js
Override user agent on all browsers
function setUserAgent(window, userAgent) {
// Works on Firefox, Chrome, Opera and IE9+
if (navigator.__defineGetter__) {
navigator.__defineGetter__('userAgent', function () {
return userAgent;
});
} else if (Object.defineProperty) {
Object.defineProperty(navigator, 'userAgent', {
get: function () {
return userAgent;
@jrran90
jrran90 / README.md
Created December 12, 2019 06:53
Access MySQL thru terminal

/Applications/MAMP/Library/bin/mysql -u root -p. Default password is "root"