Skip to content

Instantly share code, notes, and snippets.

View polymaxcube's full-sized avatar
🧸
AFK griding

samitygon polymaxcube

🧸
AFK griding
  • 09:58 (UTC -12:00)
View GitHub Profile
@polymaxcube
polymaxcube / .user
Created May 4, 2018 11:33
Go Daddy Hosting - this will help to set file upload instead php.ini that isn't working
max_execution_time = 0
memory_limit 128M
file_uploads = On
post_max_size = 256M
upload_max_filesize = 256M
time_limit = 180
max_input_vars = 5000
@polymaxcube
polymaxcube / appjs-learn.js
Created May 21, 2018 06:02
javascript primitive and refrence type
// PRIMITIVE
// String
const name = 'John Doe';
// Number
const age = 45;
// Boolean
const hasKids = true;
@polymaxcube
polymaxcube / typecon.js
Created May 21, 2018 06:22
Type Conversion
let val;
// Number to string
val = String(98796292);
// Boolean to string
val = String(true);
// Date to string
val = String( new Date());
@polymaxcube
polymaxcube / math.js
Created May 21, 2018 06:41
math operation js
const num1 = 10;
const num2 = 50;
let val;
//Simple math with numbers
val = num1 + num2;
val = num1 * num2;
val = num1 - num2;
val = num1 / num2;
val = num1 % num2;
@polymaxcube
polymaxcube / stringcon.js
Created May 21, 2018 10:08
string method & concatenation
const firstName = 'William';
const lastName = 'Johnson';
const age = 22;
const str = 'testing';
const tags = 'web devalopement, design';
let val;
// val = firstName + lastName;
@polymaxcube
polymaxcube / template_literals.js
Created May 21, 2018 12:49
Template Literals Javascript
const name = 'John';
const age = 31;
const job = 'Web Developer';
const city = 'Miami';
let html;
// Without template strings (es5)
html = '<ul><li>Name: '+ name +'</li><li>Age: ' + age + '</li><li>City: '+ city +'</li></ul>';
html = '<ul>' +
// Create some arrays
const numbers = [43,55,64,45,3213,445,0.2];
const numbers2 = new Array(222,3323,212,2121,321,2555);
const fruit = ['Apple', 'Banana', 'Orange', 'Pear'];
const mixed = [22,'Hello',true,undefined,null,{a:1, b:1},new Date];
let val;
// Get array length
val = numbers.length;
@polymaxcube
polymaxcube / ol.js
Created May 21, 2018 15:20
Object Literals
const person = {
firstName: 'Steve',
lastName: 'Smith',
age: 30,
email: 'steve@aol.com',
hobbies: ['music', 'sports'],
address: {
city: 'Miami',
state: 'FL'
},
@polymaxcube
polymaxcube / datobj.js
Created May 21, 2018 15:35
Date Object
let val;
const today = new Date();
let birthday = new Date('1988-10-21 11:25:00');
// let birthday = new Date('1988/10/21');
val = birthday;
val = today.getMonth();
val = today.getDate();
@polymaxcube
polymaxcube / app.js
Created June 11, 2018 06:52
xhr sample learning stuff
document.getElementById('button').addEventListener('click', loadData);
function loadData(){
// Create an XHR Object
const xhr = new XMLHttpRequest();
// OPEN
xhr.open('GET', 'data.txt', true);