Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Bobby Johnson NotMyself

🏠
Working from home
Block or report user

Report or block NotMyself

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
View writeClient.js
/* eslint-disable no-underscore-dangle */
const Assert = require('assert');
const GitHubApi = require('github');
function WriteClient(options) {
Assert.ok(options, 'WriteClient options required');
Assert.ok(options.organization, 'WriteClient organization required');
Assert.ok(options.repository, 'WriteClient repository required');
Assert.ok(options.token, 'WriteClient token required');
View foo.js
const animations = [
{type: 'fade-in' ...},
[
{type: 'move' ...},
{type: 'spin' ...},
{type: 'blink' ...}
],
{type: 'fade-out' ...}
]
View example.cs
/*
Here is a simple dependency example.
Say I have two classes Foo and Bar.
*/
public class Foo
{ }
public class Bar
{ }
View foo.js
module.exports = {
getStreamStatus,
wrappedGetStreamStatus: function() {
getStreamStatus();
}
}
function getStreamStatus() {
}
View foo.js
function parseMessage(emotes, message) {
//build lookup object
const lookup = emotes.reduce((lookup, emote) => {
lookup[emote.name] = emote.imageUrl
}, {});
//swap words
const words = message.split(' ')
.forEach((word) => {
if(lookup[word])
View foo.cs
public class Startup
{
public IConfiguration Configuration { get; }
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public void ConfigureServices(IServiceCollection services)
View foo.js
function dice() {
}
function rps() {
}
const map = {
'!dice':dice,
'!rps':rps,
};
View foo.cs
public async bool isLive(int twitchId) {
return cache.GetOrAdd(twitchId, () => {
return await service.isLive(twitchId);
});
}
@NotMyself
NotMyself / launch.json
Created Feb 18, 2019
the tasks.json and launch.json from broxburn
View launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/api/bin/Debug/netcoreapp2.2/api.dll",
"args": [],
View Dockerfile
FROM microsoft/dotnet:2.2-sdk-alpine AS build
WORKDIR /app
COPY . .
RUN dotnet restore
RUN dotnet build
RUN dotnet publish -c Release -o /app/deploy
FROM microsoft/dotnet:2.2-aspnetcore-runtime-alpine AS runtime
ENV DOTNET_USE_POLLING_FILE_WATCHER=true
You can’t perform that action at this time.