Skip to content

Instantly share code, notes, and snippets.

View eldenis's full-sized avatar

Denis J. González eldenis

View GitHub Profile
@DanDiplo
DanDiplo / JS-LINQ.js
Last active April 29, 2024 10:30
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
@feczo
feczo / putty-gce.md
Last active July 23, 2020 13:14
How to use Compute Engine - GCE with putty
@niksumeiko
niksumeiko / git.migrate
Last active April 30, 2024 12:54
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@rodolfo42
rodolfo42 / tomcat.sh
Last active May 13, 2020 06:02
Apache Tomcat 7 service init script
#!/bin/bash
### BEGIN INIT INFO
# Provides: tomcat
# Defalt-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Apache Tomcat 7
### END INIT INFO
# base dir of tomcat installation #
CATALINA_HOME=/opt/tomcat/