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 vm from 'node:vm' | |
import fse from 'fs-extra' | |
import { transform } from 'esbuild' | |
import { resolve, dirname, isAbsolute } from 'pathe' | |
interface TryImportOptions { | |
rootDir?: string | |
loader?: 'ts' | 'js' | |
define?: { [key: string]: string } | |
alias?: Record<string, string> |
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
'use strict' | |
const { nodes, runtime } = require('nunjucks') | |
module.exports = function compileComponent (node, frame) { | |
let componentId = this._tmpid() | |
let templateId = this._tmpid() | |
let templateId2 = this._tmpid() | |
let componentVar = `component_${componentId}` |
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
'use strict' | |
const assert = require('assert') | |
module.exports = function (obj) { | |
return new Proxy(obj, { | |
get (target, prop, receiver) { | |
if (prop in target) { | |
return Reflect.get(target, prop, receiver) | |
} |
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
'use strict' | |
const magic = require('./magic') | |
class Request { | |
constructor(req) { | |
this.req = req | |
this.user = 'morrelinko' | |
} | |
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
'use strict' | |
class YieldExtension { | |
get tags () { | |
return ['yield'] | |
} | |
parse (parser, nodes, lexer) { | |
let tag = parser.nextToken() | |
parser.skipSymbol(tag.value) |
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
createCandidate () { | |
this.$http.post(.....) | |
.then(res => { | |
this.candidateId = res.data.id | |
this.createTask(.....) | |
}) | |
.catch(noop) | |
} |
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
'use strict' | |
import _ from 'lodash' | |
let Log = _.noop | |
Log.install = function (Vue, options) { | |
Vue.prototype.$log = function (...args) { | |
try { | |
console.log(...args.map(arg => _.isPlainObject(arg) ? JSON.parse(JSON.stringify(arg)) : arg)) |
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
#!/usr/bin/env node | |
var fs = require('fs'), | |
path = require('path'), | |
child = require('child_process'), | |
argf = '', | |
deployDir = '/home/morrelinko/socialinko'; | |
process.stdin.resume(); |
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 os | |
import shutil | |
gradle_cache_dir = 'C:\\Users\\morrelinko\\.gradle\\caches\\modules-2\\files-2.1' | |
maven_cache_dir = 'C:\\Users\\morrelinko\\.m2\\repository2' | |
""" | |
Build a dictionary of java libraries | |
""" | |
packages = {} |
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
<?php | |
/** | |
* @author Morrison Laju <[email protected]> | |
*/ | |
class ArrayUtils | |
{ | |
/** | |
* Returns a new array created from another | |
* containing only the keys that we want. |
NewerOlder