Skip to content

Instantly share code, notes, and snippets.

View aelbore's full-sized avatar

Jay aelbore

View GitHub Profile
@jkga
jkga / app-style.js
Created June 21, 2018 15:52
Adding style inside Vue components' template without using vue-loader
// app-style.js
// adding <style></style> directly inside template will result in error or empty element which
// this component is trying to address
// this will allow you to dynamically insert css inside Vue template without the use of vue loader
// or if you do not want to use .vue extension at all
// however it doesnt really apply scope css (for now).
export default {
name: 'app-style',
data: function(){
return {
@jb55
jb55 / default.nix
Last active July 30, 2023 21:45
deploy dotnet core apps on nixos
{ stdenv, lib, bash, callPackage, writeText, makeWrapper, writeScript, dotnet-sdk,
patchelf, libunwind, coreclr, libuuid, curl, zlib, icu }:
let
config = "Staging";
project = "RazorCx.Api";
target = "linux-x64";
rpath = stdenv.lib.makeLibraryPath [ libunwind coreclr libuuid stdenv.cc.cc curl zlib icu ];
@impaler
impaler / compile.js
Last active July 1, 2022 00:54
Compile webpack with typescript in memory
// based on code from https://stackoverflow.com/questions/38779924/compiling-webpack-in-memory-but-resolving-to-node-modules-on-disk
import * as webpack from 'webpack'
import * as MemoryFileSystem from 'memory-fs'
import * as path from 'path'
import * as fs from 'fs'
import * as promisify from 'util.promisify'
const memFs = new MemoryFileSystem()
const statOrig = memFs.stat.bind(memFs)
@Jonalogy
Jonalogy / handling_multiple_github_accounts.md
Last active April 29, 2024 13:49
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes

@tbranyen
tbranyen / _setup.sh
Created May 29, 2017 04:03
Web Components <3 JSDOM
npm i jsdom-wc@11.0.0-alpha-1
import {
Directive, TemplateRef, Input, ChangeDetectorRef, ViewContainerRef,
IterableDiffers, OnChanges, SimpleChanges, SimpleChange
} from '@angular/core';
import { NgFor } from "@angular/common";
import { NgForRow } from "@angular/common/src/directives/ng_for";
@Directive({
selector: '[ngFor][ngForIn]'
})
@znck
znck / Vue component module
Last active November 26, 2018 01:18
Example for `rollup-plugin-vue`
Create a module for vue component.
@maddijoyce
maddijoyce / hookLoader.js
Created June 9, 2016 04:39
Istanbul hook loader to be used programatically
import { hook, Instrumenter } from 'babel-istanbul';
import { clone } from 'lodash';
let instrumenter = null;
const baselineCoverage = {};
export function getCoverageObject() {
global.coverage = global.coverage || {};
return global.coverage;
}
@zeusdeux
zeusdeux / ES5vsES6.js
Last active September 6, 2023 15:03
ES5 inheritance vs ES6 inheritance
/* ES6/ES2015 classes */
class A {
constructor() {
this.a = 10
}
print() {
console.log(this.a, this.b)
}
}