Skip to content

Instantly share code, notes, and snippets.

@murindwaz
murindwaz / angular.json.md
Created February 10, 2021 03:28 — forked from cironunes/angular.json.md
Firebase Cloud Function for Angular SSR
{
-  "outputPath": "dist/piggybank", 
+  "outputPath": "functions/dist/piggybank",
-  "outputPath": "dist/piggybank-server",
+  "outputPath:": "functions/dist/piggybank-server",
}
@murindwaz
murindwaz / deployment.yaml
Created January 16, 2020 18:06 — forked from NiklasMerz/deployment.yaml
Github Actions Kubernetes Deploy
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: myproject
name: myproject
namespace: default
spec:
progressDeadlineSeconds: 600
replicas: 1
@murindwaz
murindwaz / bibtex.png
Created December 6, 2019 05:31 — forked from max-mapper/bibtex.png
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@murindwaz
murindwaz / gulpfile.js
Created February 25, 2019 16:41 — forked from michalochman/gulpfile.js
gulp.js: babelify + browserify + sourcemaps
/* jshint strict: false */
/* globals require, console */
var gulp = require('gulp');
var exit = require('gulp-exit');
var browserify = require('browserify');
var watchify = require('watchify');
var babelify = require('babelify');
var source = require('vinyl-source-stream');
@murindwaz
murindwaz / mockstream.js
Created March 1, 2018 18:21 — forked from mjackson/mockstream.js
A mock stream wrapper for node.js
var util = require("util"),
Stream = require("stream").Stream;
module.exports = MockStream;
/**
* A constructor that inherits from Stream and emits data from the given
* `source`. If it's a Stream it will be piped through to this stream.
* Otherwise, it should be a string or a Buffer which will be emitted by this
* stream as soon as possible.
@murindwaz
murindwaz / mockreadwritestream.js
Created March 1, 2018 18:20 — forked from indexzero/mockreadwritestream.js
A mock stream for node.js that is both Readable and Writeable.
var events = require('events'),
util = require('util');
var MockReadWriteStream = helpers.MockReadWriteStream = function () {
//
// No need to do anything here, it's just a mock.
//
};
util.inherits(MockReadWriteStream, events.EventEmitter);
@murindwaz
murindwaz / mockreadwritestream.js
Created March 1, 2018 18:20 — forked from Marak/mockreadwritestream.js
A mock stream for node.js that is both Readable and Writeable.
var events = require('events'),
util = require('util');
var MockReadWriteStream = helpers.MockReadWriteStream = function () {
//
// No need to do anything here, it's just a mock.
//
};
util.inherits(MockReadWriteStream, events.EventEmitter);
@murindwaz
murindwaz / LICENSE.txt
Created February 21, 2018 17:25 — forked from jed/LICENSE.txt
use anchor tags to parse URLs into components
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
SELECT id, keyword, item_id, item_type, created_by, EXTRACT, extract_start, extract_end, SUM(occurrences/(SELECT keyword_count FROM keyword_counts WHERE item_id = t.item_id AND created_by = [creator user id goes here] AND item_type = t.item_type) * LOG((SELECT COUNT(1) FROM search_results)/(1+(SELECT COUNT(1) FROM search_results WHERE '.[keyword 'OR' statements go here].')))) AS keyword_density_product FROM (SELECT * FROM search_results WHERE ('.[keyword 'OR' statements go here].') AND created_by = [creator user id goes here] AND item_type = [item type, e.g. 'document', goes here]) t GROUP BY item_id ORDER BY keyword_density_product DESC LIMIT [pagination LIMIT goes here] OFFSET [pagination OFFSET goes here];
http://snipplr.com/view/51513/
@murindwaz
murindwaz / HOWTO.md
Created January 31, 2018 19:59 — forked from kylefrost/HOWTO.md
How-To: Tweet All Commit Messages

Creating the post-commit file

Note: If you want to use your personal Twitter account to post commits, go to Step 2

  1. Create a new Twitter account for your commit messages. Example
  2. Go to http://dev.twitter.com and Sign In with your Twitter account you are posting commit messages to.
  3. Hover over your username in the top-right corner after signing in and select "My Applications"
  4. Create a new application
  5. The name, description, and site can all be whatever you want, but leave Callback URL empty
  6. Under "Application Settings" click "modify app permissions" next to "Access level"