Skip to content

Instantly share code, notes, and snippets.

Jordan Hansen aarmora

Block or report user

Report or block aarmora

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aarmora
aarmora / SassMeister-input-HTML.html
Created Jul 7, 2015
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<div class="admin_page">
<textarea></textarea>
</div>
@aarmora
aarmora / SassMeister-input-HTML.html
Last active Aug 29, 2015
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<style>
.admin_page textarea {
height: 200px;
}
</style>
<div class="admin_page">
<div>
<div class="form-group">
View models.ts
import * as mongoose from "mongoose";
export interface LSClass {
create: Boolean;
delete: Boolean;
}
export interface LS {
class: LSClass;
}
View http withCredentials
@Injectable()
export class AccountService {
constructor(
private http: Http) {
// This allows the cookie to be set and sent.
// It appears that once the cookie is set with login, it works for each call (even in other services)
let _build = (<any>http)._backend._browserXHR.build;
(<any>http)._backend._browserXHR.build = () => {
let _xhr = _build();
View account.service.spec.ts
import {
it,
inject,
describe,
beforeEach,
beforeEachProviders,
expect,
} from '@angular/core/testing';
import { BaseRequestOptions, Response, ResponseOptions, Http } from '@angular/http';
import { MockBackend, MockConnection } from '@angular/http/testing';
View Input module
import {
Component,
NgModule,
Input,
Output,
EventEmitter,
forwardRef,
ModuleWithProviders
} from '@angular/core';
import { NG_VALUE_ACCESSOR, ControlValueAccessor, FormsModule, ReactiveFormsModule } from '@angular/forms';
View Input component
<input
[id]="id ? id : ''"
[type]="type"
[placeholder]="placeholder ? placeholder : ''"
[attr.name]="name"
[tabIndex]="tabIndex ? tabIndex : ''"
[checked]="checked !== undefined ? checked : ''"
[required]="required"
(focus)="focus.emit($event); isFocused = true;"
(blur)="blur.emit($event); isFocused = false;"
@aarmora
aarmora / audible-library-scraper.js
Last active Jul 12, 2017
Just paste this into the console of your audible library and run it and it will compile an object of basic information of all the books (shown) in your library. This is brittle and depends on their html structure remaining the same. If they change it, this could no longer work.
View audible-library-scraper.js
let tables = document.getElementsByTagName('table');
let rows = tables[2].getElementsByTagName('tr');
let books = [];
for (let i = 0; i < rows.length; i++) {
try {
// It's generally a normal row if there is a fourth cell
if (rows[i].cells[3]) {
let url = rows[i].cells[3].children[0].href;
let title = rows[i].cells[3].children[0].innerText;
View Getting Started - FMD.md

Getting started

Download these

Visual Studio Code

This will be how we will edit the code. It's lightweight and pretty awesome.

Node JS

@aarmora
aarmora / smurf_checker.py
Created Apr 8, 2019
Returns indicative information of if a user is using the same account as another or not
View smurf_checker.py
import requests
import datetime as dt
import requests
first_user = '80623424'
second_user = '887227975'
def get_intervals(l):
You can’t perform that action at this time.