Skip to content

Instantly share code, notes, and snippets.



Block or report user

Report or block linkin-park

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
View util.js
(function($) {
* Generate an indented list of links from a nav. Meant for use with panel().
* @return {jQuery} jQuery object.
$.fn.navList = function() {
var $this = $(this);
$a = $this.find('a'),
View CSVProcessor
package com.detector;
import java.util.ArrayList;
import java.util.List;
public class CSVProcessor {
final String doubleQuoteRegex = "^\"\".*";
private String[] process(String buffer) {
List<String> values = new ArrayList<String>();
View Makefile
# Hello, and welcome to makefile basics.
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
# Once you're done here, go to
# to learn SOOOO much more.
View Error
module.exports = {
// The absolute path to your project
context: __dirname + "/",
// the entry point for our app
entry: './main.js',
// where to put the compiled output (what our script tag will link to)
output: {
// where does it go?
path: __dirname + "/",
// what is the file called?
linkin-park / Hello React
Created Oct 16, 2017
Error: HelloC.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.
View Hello React
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<script src=""></script>
<script src=""></script>
<div id="app"></div>
linkin-park /
Created Oct 13, 2017 — forked from gunjanpatel/
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}'

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

View Erlang
main() ->
Arr = read_2darray(6,6,"~d"),
%taken in reverse order
read_array(0,_) -> [];
View Erlang - Medium
% Enter your code here. Read input from STDIN. Print output to STDOUT
% Your class should be named solution
main() ->
{ok,[N,K]} = io:fread("","~s~d"),
P = ktimes(N,K,""),
{Num,_} = string:to_integer(P),
View Erlang
%R-Repeat,L-actual List ,
main() ->
[R|L] = read_input([]),
foo(_,[]) -> [];
foo(R,[X|Xs]) -> repeat(X,R), foo(R,Xs).
You can’t perform that action at this time.