Skip to content

Instantly share code, notes, and snippets.

View erikpantzar's full-sized avatar
🎯
Focusing

Erik Pantzar erikpantzar

🎯
Focusing
View GitHub Profile
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
var expires = "expires="+d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');

whatis?

variables

  var secret = "farted"
  let location = 'Living room'
  const literal = `I just ${farted} in the ${location}`
function doIt() {
var url = window.location.href
var findURL = '/bestill-fly'
if (url.indexOf(findURL)) {
var newCopyFlightOnly = document.querySelector("#search-tabs > ul > li:nth-child(3) > a > span")
newCopyFlightOnly.innerText = 'Fly'
} else {
console.log('FEL')
}
  • vector - "media luna" eastern - FOB
  • mag - media luna bravo east 200m
  • red dot - "Malca"
  • 3d - "Tabacal"
const o = ['abc', 'hejhej', 'defg'];
const n = ['hejhej', 'defg', 'JOHAN'];
const getDiff = (current, neu) => {
return neu.filter((item, index) => {
if(current.indexOf(item) === -1) {
return item
}
})
}
@erikpantzar
erikpantzar / flickrApp.js
Created October 2, 2017 10:51
application to get flickr images
<html>
<script>
// step1 create application on flickr
const API_KEY = 'd1353a0c57b83a6dff262ea9de1c3a9c'; // 0175b82863673a7b456a7bbd08235496
const USER_ID = '150531487%40N08'
// const SECRET = 'fc60f66a99c9b170'
// getPhotos
const apiCall = `https://api.flickr.com/services/rest/?method=flickr.people.getPhotos&api_key=${API_KEY}&user_id=${USER_ID}&format=json&nojsoncallback=1`

Keybase proof

I hereby claim:

  • I am erikpantzar on github.
  • I am epantzar (https://keybase.io/epantzar) on keybase.
  • I have a public key ASDZkYi-1HmkVG_rS0V8P5WK2bT4A8bsNquP_nSBgSnwKQo

To claim this, I am signing this object: