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
#!/bin/sh | |
mkdir /media/WD\ Passport | |
modprobe fuse | |
udevil --mount /dev/sda1 |
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
export function AuthenticationInterceptor($log) { | |
'ngInject'; | |
return { | |
request(config) { | |
$log.debug('intercepted'); | |
return config; | |
} | |
}; | |
} |
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
import { AuthenticationInterceptor } from './authentication-interceptor'; | |
import { interceptorConfig } from './config'; | |
export default angular.module('sampleApp.services.interceptors', [ | |
]) | |
.config(interceptorConfig) | |
.factory('AuthenticationInterceptor', AuthenticationInterceptor); |
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
import InterceptorsModule from './interceptors/'; // the interceptors module must be named index.js | |
export default angular.module('sampleApp.services', [ | |
InterceptorsModule.name | |
]); |
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
export function interceptorConfig($httpProvider) { | |
'ngInject'; | |
$httpProvider.interceptors.push('AuthenticationInterceptor'); | |
} |
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
(function getAllUsers() { | |
const table = Array.from(document.querySelectorAll('table')) | |
.filter(el => el.className.length > 0) | |
.pop(); | |
if (!table) { | |
throw new Error('Unable to find a valid table. Perhaps Google Play Developer tweaked their markup?'); | |
} | |
const users = Array.from(table.querySelectorAll('tr')) |
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
import React from 'react'; | |
import Link from 'gatsby-link'; | |
import Helmet from 'react-helmet'; | |
// import '../css/index.css'; // add some style if you want! | |
export default function Index({ | |
data | |
}) { | |
const { edges: posts } = data.allMarkdownRemark; |
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
/** | |
* This file includes polyfills needed by Angular and is loaded before the app. | |
* You can add your own extra polyfills to this file. | |
* | |
* This file is divided into 2 sections: | |
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. | |
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main | |
* file. | |
* | |
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that |
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
export const pageQuery = graphql` | |
query IndexQuery { | |
site { | |
siteMetadata { | |
title | |
author | |
} | |
} | |
allMarkdownRemark(sort: { order: DESC, fields: [frontmatter___date] }) { | |
edges { |
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
const crypto = require('crypto'); | |
const get = require('lodash.get'); | |
const setNullToEmpty = data => | |
Object.keys(data).reduce((merged, key) => { | |
if (key !== 'null') { | |
merged[key] = data[key] === null ? '' : data[key]; | |
} | |
return merged; | |
}, {}); |
OlderNewer