Skip to content

Instantly share code, notes, and snippets.

Landan lmj0011

Block or report user

Report or block lmj0011

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lmj0011
lmj0011 / atom_plugins.txt
Created Feb 17, 2016
Some useful plugins for Atom text editor
View atom_plugins.txt
remote-ftp@0.7.20
minimap@4.19.0
script@3.5.1
es6-javascript@0.5.0
@lmj0011
lmj0011 / jquery-scroll-bottom.js
Created Jun 19, 2016 — forked from toshimaru/jquery-scroll-bottom.js
Detect the scrolling to bottom of the page using jQuery.
View jquery-scroll-bottom.js
$(window).on("scroll", function() {
var scrollHeight = $(document).height();
var scrollPosition = $(window).height() + $(window).scrollTop();
if ((scrollHeight - scrollPosition) / scrollHeight === 0) {
// when scroll to bottom of the page
}
});
@lmj0011
lmj0011 / 0_reuse_code.js
Created Dec 26, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@lmj0011
lmj0011 / RDS-Aurora-CloudFormation-Example.yaml
Created Aug 30, 2017 — forked from sjparkinson/RDS-Aurora-CloudFormation-Example.yaml
A basic CloudFormation template for an RDS Aurora cluster.
View RDS-Aurora-CloudFormation-Example.yaml
---
AWSTemplateFormatVersion: 2010-09-09
Description: A basic CloudFormation template for an RDS Aurora cluster.
Parameters:
DatabaseInstanceType:
Default: db.r3.large
AllowedValues:
- db.r3.large
- db.r3.xlarge
- db.r3.2xlarge
@lmj0011
lmj0011 / gitHubCherryPicking.md
Last active Mar 21, 2018
Remove Minus and Plus Signs when cherrypicking Github Commits
View gitHubCherryPicking.md

Open up the web console while viewing the file(s) of a commit on Github and paste in this snippet:

var added_nodes = document.querySelectorAll(".blob-code.blob-code-addition .blob-code-inner");
var deleted_nodes = document.querySelectorAll(".blob-code.blob-code-deletion .blob-code-inner");
// var neutral_nodes = document.querySelectorAll(".blob-code.blob-code-context .blob-code-inner"); //don't think one is necessary
var str, new_str, pieces;

function removeNodes(nodes) {
  for(var i=0;  i < nodes.length;  i++) {
@lmj0011
lmj0011 / my.cnf
Last active May 27, 2018 — forked from chrisjlee/my.cnf
my.cnf file optimized for InnoDB 64bit setups
View my.cnf
# forked from https://gist.github.com/chrisjlee/2973469
[client]
#password = [your_password]
#port = 3306
#socket = /tmp/mysqld.sock
# *** Application-specific options follow here ***
#
@lmj0011
lmj0011 / rename.sh
Last active Feb 11, 2019
slugify filenames in the current directory
View rename.sh
# c/p this into current directory
# note - does not remove special chars
rename -v 'y/A-Z/a-z/' * && rename -v 's/ /-/g' *
@lmj0011
lmj0011 / rejson-for-ubuntu.md
Last active Apr 7, 2019
Building and Loading the ReJSON Module on Linux Ubuntu 16.04 for Redis
View rejson-for-ubuntu.md

make sure you have at least redis v4.0+

redis-server --version

redis-cli --version

install the build-essential package

apt-get install build-essential

@lmj0011
lmj0011 / gitCheck.md
Last active Apr 23, 2019 — forked from mzabriskie/README.md
Check git status of multiple repos
View gitCheck.md

Usage:

gitCheck [directory]

This will run git status on each repo under the directory specified. If called with no directory provided it will default to the current directory.


Changes

@lmj0011
lmj0011 / textnow-conversation-purger.js
Created Jul 25, 2019
Delete All Conversations From Your TextNow Account
View textnow-conversation-purger.js
(async function () {
let lastGlobalId;
let fetchUrl;
let bigOleArrayOfContacts = [];
const USERNAME_QUERY_SELECTOR = "#recent-header > div.account-details > div.name";
const CSRF_TOKEN_QUERY_SELECTOR = "meta[name=csrf-token]";
console.log("Script has started.");
You can’t perform that action at this time.