This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to Configure Your iTerm Terminal for an Amazing Look: | |
https://blog.protein.tech/make-your-macos-terminal-look-great-76dceb96607e | |
https://opensource.com/article/20/8/iterm2-zsh | |
https://medium.com/@jeantimex/how-to-configure-iterm2-and-vim-like-a-pro-on-macos-e303d25d5b5c | |
https://iterm2colorschemes.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from IPython.display import display, clear_output | |
fig = plt.figure() | |
ax = fig.add_subplot(1, 1, 1) | |
for i in range(20): | |
x = np.arange(0, i, 0.1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func health() { | |
dowork := func(done <-chan interface{}, pulseInterval time.Duration) (<-chan interface{}, <-chan time.Time) { | |
hearthbeat := make(chan interface{}) | |
results := make(chan time.Time) | |
go func() { | |
defer close(hearthbeat) | |
defer close(results) | |
pulse := time.Tick(pulseInterval) | |
workGen := time.Tick(2 * pulseInterval) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create file: | |
sudo vim /usr/share/applications/intellij.desktop | |
// add the following | |
[Desktop Entry] | |
Version=13.0 | |
Type=Application | |
Terminal=false | |
Icon[en_US]=/home/rob/.intellij-13/bin/idea.png | |
Name[en_US]=IntelliJ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
var or func(channels ...<-chan interface{}) <-chan interface{} | |
or = func(channels ...<-chan interface{}) <-chan interface{} { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
sub serializeToPhpArray { | |
my @arr = @{$_[0]}; | |
my $content = "a:".@arr.":{"; | |
for (my $i=0; $i < @arr; $i++) { | |
my $val = $arr[$i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class PascalTriangle | |
{ | |
public static void main(String a[]) throws Exception | |
{ | |
int num=0; | |
Scanner scan=new Scanner(System.in); | |
System.out.println("Enter number of rows for pascal triangle:"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.Iterator; | |
import java.util.Map; | |
import java.util.function.Consumer; | |
import java.util.function.Function; | |
import java.util.stream.Collectors; | |
import java.util.stream.IntStream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parser.prototype.findElements = function(block, filename) { | |
var elements = []; | |
// Replace Linebreak with Unicode | |
block = block.replace(/\n/g, '\uffff'); | |
// Elements start with @ | |
var elementsRegExp = /(@(\w*)\s?(.+?)(?=\uffff[\s\*]*@|$))/gm; | |
var matches = elementsRegExp.exec(block); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Replace Linebreak with Unicode | |
block = block.replace(/\n/g, '\uffff'); |
NewerOlder