Skip to content

Instantly share code, notes, and snippets.

View freewayspb's full-sized avatar
🚀
Focusing

Aleksei Chyrva freewayspb

🚀
Focusing
View GitHub Profile
@schmidsi
schmidsi / ScrollPositionProvider.tsx
Last active March 10, 2021 09:03
Scribble to fix scroll position
import React, { useEffect, useContext } from 'react';
import Router from 'next/router';
export const ScrollPositionContext = React.createContext({
triggerScroll: () => null,
});
export const useScrollPosition = () => useContext(ScrollPositionContext);
let routerBound = false;
@artzub
artzub / make.sh
Last active November 30, 2022 11:41
Install JetBrains Hub + YouTrack + UpSource + Nginx
#!/bin/bash
apt-get install mc htop git unzip wget curl -y
echo
echo "====================================================="
echo " WELCOME"
echo "====================================================="
echo
echo "Hub"
@fjeldstad
fjeldstad / adal-app.js
Last active October 24, 2019 15:57
Example usage of login popup with adal.js
var authContext = new AuthenticationContext({
// ...
});
// Our custom asynchronous login function. Uses authContext.config.displayCall
// to show the Azure AD login page in a popup window, then periodically checks
// the popup window for the resulting hash + uses adal.js to handle it.
// For this to work, we need a dummy landing page to use as redirectUri.
// This can be an empty HTML page, but needs to have the same origin as the
// main window.
@codedokode
codedokode / js-task-1.md
Last active March 4, 2024 12:35
Задания на яваскрипт (простые)
<snippet>
<content><![CDATA[
<!-- begin $1 -->
<div class="$1">
$2
</div>
<!-- end $1 -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>di</tabTrigger>
@demisx
demisx / angularjs-providers-explained.md
Last active May 17, 2024 03:38
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant