Skip to content

Instantly share code, notes, and snippets.

View alexdriaguine's full-sized avatar
👻

Alex Driaguine alexdriaguine

👻
  • Stockholm, Sweden
View GitHub Profile
@alexdriaguine
alexdriaguine / etc-hosts-on-win.md
Created February 1, 2019 07:14 — forked from zenorocha/etc-hosts-on-win.md
/etc/hosts on Windows

1. Get your IP Address

echo `ifconfig $(netstat -nr | grep -e default -e "^0\.0\.0\.0" | head -1 | awk '{print $NF}') | grep -e "inet " | sed -e 's/.*inet //' -e 's/ .*//' -e 's/.*\://'`

2. Modify your hosts file

notepad

Each YouTube video has 4 generated images. They are predictably formatted as follows:
http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg
The first one in the list is a full size image and others are thumbnail images. The default thumbnail image (ie. one of 1.jpg, 2.jpg, 3.jpg) is:
http://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg
interface WindowEventMap extends GlobalEventHandlersEventMap {
"abort": UIEvent;
"afterprint": Event;
"beforeprint": Event;
"beforeunload": BeforeUnloadEvent;
"blur": FocusEvent;
"canplay": Event;
"canplaythrough": Event;
"change": Event;
"click": MouseEvent;
import {Request, Response, Router} from 'express';
import passport from 'passport';
import {Strategy} from 'passport-local';
const router: Router = Router();
const myUsers = [{username: 'will', password: 'secret'}, {username: 'foo', password: 'bar'}];
passport.use(
new Strategy((username, password, done) => {
{
"awayScores": [
{
"name": "Patrik Aihonen (MV)",
"events": [
{
"name": "3 conceded goals",
"score": -15
}
]
@alexdriaguine
alexdriaguine / The Technical Interview Cheat Sheet.md
Created October 7, 2016 12:38 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
sync-settings
function AuthService($http, $q, API) {
var endpoint = "knock/auth_token";
var store = {
authenticateUser: function(username, password) {
var requestBody = {
auth: {
email: username,
password: password
}
}
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->