Skip to content

Instantly share code, notes, and snippets.

View mykeels's full-sized avatar
😄
faffing!

Ikechi Michael mykeels

😄
faffing!
View GitHub Profile
@gladchinda
gladchinda / add-function-es5.js
Last active January 11, 2018 19:29
Solution to sum function challenge. Here are some examples: ( add(2) == 2 ) ( add(1)(2)(3) == 6 )
var add = function add() {
var args = Array.prototype.slice.call(arguments);
var fn = Function.prototype.bind.apply(add, [null].concat(args));
fn.valueOf = function() {
return args.reduce(function(a, b) {
return a + parseInt(b);
}, 0);
};
return fn;
}
@LordRahl90
LordRahl90 / Stack.java
Last active November 1, 2018 11:30
Implementation of stack with java. Hoping to push golang with this understanding soon.
public class Stack{
private Node head;
//I Prefer this to having to walk the length of the stack everytime.
private int length=0;

Add the target below to the project file for your dotnet core global tool. You can run this target to simplify reinstalling the global tool. You can execute this target with dotnet build -t:InstallTool.

When this target is executed the following will happen (in this order):

  • Project is packed into a NuGet package
  • Tool is uninstalled with dotnet tool uninstall
  • Tool is installed with dotnet tool install
  • Help is called on the tool just installed
@getify
getify / better-web.md
Created March 12, 2019 13:19
Building That Better Web

Building That Better Web

In honor of the 30th anniversary of the web, I wanted to share a few thoughts about what a better web could aspire to be, and challenge us to move toward it.

The Worser Web

It's tempting to frame "better" simply in terms of improvement and progress, as in how far the web has come over the last 20+ years. As a developer, I like many others get all too excited about fancy new features like Service Workers, WebRTC, and yes, even CSS Grids. The pace of change is dizzying, but it feels like a great problem to have too many awesome features to learn and use!

So in one practical respect, a better web is one that empowers developers and users alike to express themselves and connect with others more fluently.

@jschementi
jschementi / git-tfs.md
Created January 26, 2010 08:35
Using TFS and GIT together

Using TFS and GIT together

What if your team uses TFS, but you want offline support? You can have a Git repo as well, but then getting your changes to TFS is burdensome. Here’s where a GIT to TFS bridge would be handy.

Setting up your repo

Here’s how to keep a TFS repository foo, and a GIT repository bar, in sync. First step is you need to create a new TFS workspace:

cd \

tf workspace /new /noprompt Foo

@allengblack
allengblack / README.md
Last active January 14, 2021 16:28
Find the Isogram

Write a program that checks if a word supplied as the argument is an Isogram. An Isogram is a word in which no letter occurs more than once. Create a function called is_isogram that takes one argument, a word to test if it's an isogram. This method should return a tuple/list/array of the word and a boolean indicating whether it is an isogram. If the argument supplied is an empty string, return the argument and False, ie (argument, False). If the argument supplied is not a string, raise a TypeError with the message 'Argument should be a string'. The challenge here is to write three unique solutions, using whichever language you like. However, you must maintain the specified identifiers and error messages in the question and use the least possible number of characters to solve the problem. White space will be ignored for readability's sake.

@entropiae
entropiae / fix_git_sslread_9806.sh
Last active February 3, 2022 23:32
git: how to solve "SSLRead() return error -9806" in OSX using brew
$ brew remove git
$ brew remove curl
$ brew install openssl
$ brew install --with-openssl curl
$ brew install --with-brewed-curl --with-brewed-openssl git
@jtanguy
jtanguy / dependency-graph-plugin.js
Created June 6, 2018 19:20
Webpack plugin to generate the dependency graph
const path = require('path');
class DependencyGraphPlugin {
apply(compiler) {
compiler.hooks.emit.tap("DependencyGraphPlugin", (compilation) => {
let deps = [];
compilation.modules.forEach(m => {
// console.log(m)
const file = path.relative('', m.resource)
@loic-moriame
loic-moriame / index.js
Created July 24, 2015 09:23
node.js + sequelize + sqlite
'use strict';
var Sequelize = require('sequelize');
var sequelize = new Sequelize('mainDB', null, null, {
dialect: "sqlite",
storage: './test.sqlite',
});
sequelize
@pksunkara
pksunkara / clarg.md
Created December 16, 2011 12:27
Command Line Arguments Specification

Command Line Arguments Specification

This specification defines Command Line Arguments level 1 (CLARG 1.0). This document aims to direct development of command line tools conform to a set of rules while parsing options.

Arguments

The different type of arguments are:

  • Short Option
  • Long Option