This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HotspotView | |
include DataMapper::Resource | |
property :dm_user_id, Integer, :key => true | |
property :hotspot_id, Integer, :key => true | |
belongs_to :dm_user | |
end | |
class DmUser | |
# already taken care of by sinatra-authentication |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require "digest/sha1" | |
require 'rack-flash' | |
require "dm-core" | |
#for using auto_migrate! | |
require "dm-migrations" | |
require "sinatra/reloader" | |
require 'haml' | |
require "sinatra-authentication" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addressable (2.2.6) | |
backports (2.3.0) | |
daemons (1.1.4) | |
data_objects (0.10.6) | |
dm-core (1.1.0) | |
dm-do-adapter (1.1.0) | |
dm-migrations (1.1.0) | |
dm-mysql-adapter (1.1.0) | |
dm-sqlite-adapter (1.1.0) | |
dm-timestamps (1.1.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get this: https://github.com/jedie/python-ping.git | |
import os | |
import string | |
from time import time, sleep | |
from ping import Ping | |
class QuietPing(Ping): | |
def print_failed(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.permConstructor = function(perm) { | |
return ko.computed({ | |
read: function(){self.hasPerm(perm)}, | |
write: function(val){ | |
if (val) { | |
self.permissions.push(perm); | |
} else { | |
self.permissions.remove(perm); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[20pt]{article} | |
\usepackage[lyric]{songs} | |
\usepackage{fullpage} | |
\usepackage{fontspec} | |
\iflyric | |
\renewcommand{\lyricfont}{\sffamily\Large} | |
\renewcommand{\notefont}{\sffamily\Medium} | |
\fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
request: | |
https://login.windows.net/common/oauth2/authorize?client_id={CLIENT ID}&client_secret={CLIENT SECRET}&redirect_uri=http%3A%2F%2Fauth-dev.lvh.me%3A3000%2Fauth%2Fazure_ad%2Fcallback&resource=Microsoft.SharePoint&response_type=code&scope=MyFiles.Read%2CMyFiles.Write | |
response: | |
{"error"=>"invalid_resource", "error_description"=>"AADSTS50001: Resource 'Microsoft.SharePoint' is disabled.\r\nTrace ID: 16750e77-b8c9-4965-ae3c-a471dfc80a00\r\nCorrelation ID: 9bdba4f9-5277-48f6-b735-2548ce4aba71\r\nTimestamp: 2017-04-28 18:49:48Z"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A script to auto add // eslint-disable-next-line or /* eslint ... to files that don't lint | |
* Example usage: | |
* $ yarn eslint --rule '@typescript-eslint/ban-ts-comment: error' --quiet -f json -o eslint_errors.json src/ tests/ | |
* $ yarn ts-node auto-eslint-ignore.ts eslint_errors.json | |
*/ | |
import { readFile, writeFile } from 'fs/promises'; | |
import { uniq } from 'lodash'; |