Install-Package Microsoft.AspNet.WebApi.Cors
(in umbraco core project)
(WARNING! This will install latest version of .net mvc webapi => which may fuck up things if your stuff has dependencies to older versions of MVC webapi)
require('fs').writeFile( | |
require('path').join(process.cwd(), '/.tob.log'), | |
JSON.stringify(_DATA_, null, 4), | |
(err)=>{if (err) console.log(err)} | |
) |
Install-Package Microsoft.AspNet.WebApi.Cors
(in umbraco core project)
(WARNING! This will install latest version of .net mvc webapi => which may fuck up things if your stuff has dependencies to older versions of MVC webapi)
import React from 'react'; | |
import Image from 'next/image'; | |
export function Slider() { | |
const sliderRef = React.useRef<HTMLDivElement>(null); | |
const [activeIndex, setAciveIndex] = React.useState(0); | |
function setActive(i: number) { | |
sliderRef.current?.scrollTo((sliderRef.current.scrollWidth / quotes.length) * i, 0); | |
} |
@{ | |
Layout = null; | |
} | |
<!-- OVERWRITE BELOW THIS LINE --> |
Requeires ng-file-upload https://github.com/danialfarid/ng-file-upload/ | |
Dont forgett to inject into app module 'ngFileUpload' | |
Use in template: <file-uploader></file-uploader> |
@{ | |
var longitude = Location.Longitude.ToString() ?? null; | |
var latitude = Location.Latitude.ToString() ?? null; | |
var googlemapSource = "https://www.google.com/maps/embed/v1/"; | |
if (!string.IsNullOrEmpty(latitude) && !string.IsNullOrEmpty(longitude)) | |
{ | |
// map mode | |
googlemapSource += "place?"; |
const debug = true; | |
function debugLog(message) { | |
if (debug) { | |
console.log(message); | |
} | |
} | |
let sharedCached: { [key: string]: IKachelerCacheItem<unknown> } = {}; | |
export const kacheler = { |
import { Injectable, Injector } from '@angular/core'; | |
import { HttpErrorResponse, HttpHandler, HttpInterceptor, HttpRequest, HttpEvent, HttpClient, HttpHeaders } from '@angular/common/http'; | |
import { Observable } from 'rxjs/Observable'; | |
import { ErrorObservable } from 'rxjs/Observable/ErrorObservable'; | |
import { EmptyObservable } from 'rxjs/Observable/EmptyObservable'; | |
import { BehaviorSubject } from 'rxjs/BehaviorSubject'; | |
import { catchError, filter, take, switchMap, finalize } from "rxjs/operators"; | |
import { APIURL } from "../app/constants"; | |
import { UserService } from "./user/user.provider"; |
javascript:!function(){const SLACK_BOT_TOKEN="your slack bot token";async function get(a=[],b){let c=`https://slack.com/api/conversations.history?token=${SLACK_BOT_TOKEN}&channel=CJTD5RP7Y`;b&&(c+="&cursor="+b);const d=await fetch(c),e=await d.json();return a=[...a,...e.messages],e.has_more?await get(a,e.response_metadata.next_cursor):a}async function init(){const a=await get(),b=a.reduce((a,b)=>{try{const c=b.text.split("com/track/")[1].split("?")[0],d=`https://open.spotify.com/track/${c}`;a.arr.push(d),a.str+=`${d}\n`}catch{}return a},{arr:[],str:""});console.log(b);var c=window.open();const d=c.document.createElement("textarea");d.value=b.str,d.style="width:100%;height: 600px;font-size: 16px",c.document.body.innerHTML=`<p>${b.arr.length} tracks</p>`,c.document.body.appendChild(d)}init();}(); |
javascript:!function(){let e=prompt("Ange namn på listan du vill kopiera");e&&(e=e.toLowerCase().trim());let t=$(".list-header-name-assist").filter((t,n)=>n.innerHTML.toLowerCase()===e).first().closest(".list").find(".list-card-title").contents().toArray().filter(e=>3===e.nodeType).map(e=>e.data).reduce((e,t)=>(e.text=`${e.text}${t}\n`,e),{html:"",text:""});var n=window.open();const o=n.document.createElement("textarea");o.value=t.text,o.style="width:100%;height: 600px;font-size: 16px",n.document.body.appendChild(o),o.select(),n.document.execCommand("copy")}(); |