Skip to content

Instantly share code, notes, and snippets.

View kandros's full-sized avatar
:bowtie:
o.o

Jaga Santagostino kandros

:bowtie:
o.o
View GitHub Profile
// Traccia:
// Crea una funzione che prende come parametri 2 numeri e li somma e ritorna il risultato
function myFunc(x, y) {
return x + y
}
function test() {
let result = myFunc()
@kandros
kandros / launch.json
Created April 17, 2018 09:53
debug current file in VSCODE
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${file}"
}
],
@kandros
kandros / launch.json
Created April 17, 2018 09:53
debug current file in VSCODE
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${file}"
}
],
@kandros
kandros / gist:32dbd354400d2b464e663c9c1b05779f
Created January 23, 2018 12:01
getpocket.com access token
https://getpocket.com/auth/authorize?request_token={token_here}&redirect_uri=www.google.com,
@kandros
kandros / numToColumn.js
Created December 17, 2017 15:58
to calculate excel column name from numbers
/**
* Takes a positive integer and returns the corresponding column name.
* @param {number} num The positive integer to convert to a column name.
* @return {string} The column name.
*/
function toColumnName(num) {
for (var ret = '', a = 1, b = 26; (num -= a) >= 0; a = b, b *= 26) {
ret = String.fromCharCode(parseInt((num % b) / a) + 65) + ret;
}
return ret;
@kandros
kandros / index.html
Last active November 21, 2017 20:21
OOvzmX
<h1>Sometime</h1>
<h2>Very little styling</h2>
<h3>is enough</h3>
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Alias saepe laudantium, accusantium nam error facilis, sapiente id nulla esse quia veniam tempora, laborum quasi eum officiis deserunt optio reiciendis corrupti? Id nulla aliquam exercitationem aspernatur nesciunt, modi magni, dicta officiis esse voluptatem corrupti dolorum delectus natus dolor, rem amet accusamus.</p>
@kandros
kandros / loading.org
Created July 13, 2017 13:45 — forked from TheBB/loading.org
Loading in Spacemacs

Emacs packages, features, files, layers, extensions, auto-loading, require, provide, use-package… All these terms getting you confused? Let’s clear up a few things.

Files

Emacs files contains code that can be evaluated. When evaluated, the functions, macros and modes defined in that file become available to the current Emacs session. Henceforth, this will be termed as loading a file.

One major problem is to ensure that all the correct files are loaded, and in the

@kandros
kandros / interceptors.js
Created July 2, 2017 16:16 — forked from javisperez/interceptors.js
Axios interceptor for cache with js-cache
// Usually I use this in my app's config file, in case I need to disable all cache from the app
// Cache is from `js-cache`, something like `import Cache from 'js-cache';`
const cacheable = true,
cache = new Cache();
// On request, return the cached version, if any
axios.interceptors.request.use(request => {
// Only cache GET requests
if (request.method === 'get' && cacheable) {
export default [
"AFGHANISTAN",
"ALBANIA",
"ALGERIA",
"AMERICAN SAMOA",
"ANDORRA",
"ANGOLA",
"ANGUILLA",
"ANTARCTICA",
"ANTIGUA AND BARBUDA",
export default [
'Afghanistan',
'Albania',
'Algeria',
'Andorra',
'Angola',
'Antigua & Deps',
'Argentina',
'Armenia',
'Australia',