This file contains hidden or 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
event = require('pilot/event') | |
Anchor = require('ace/anchor').Anchor | |
doc = ace_editor.session.getDocument() | |
editablePositions = [[1, 0, 2, 0]] # allow editong only the second row | |
jQuery.each editable, (index, row) -> | |
editablePositions.push [new Anchor(doc, row[0], row[1]), new Anchor(doc, row[2], row[3])] | |
Range = require('ace/range').Range |
This file contains hidden or 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
new File("camelcase.txt").eachLine { line-> | |
def tokens = line.split("(?<!(^|[A-Z]))(?=[A-Z])|(?<!^)(?=[A-Z][a-z])") | |
def words = [] | |
tokens.each { | |
words.push(it.capitalize()) | |
} | |
println words.join(" ") | |
This file contains hidden or 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 __builtin__ | |
def fake_input(prompt): | |
print prompt | |
return "trgy" | |
__builtin__.raw_input = fake_input | |
name = raw_input("Enter your name >") |
This file contains hidden or 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" | |
"math/rand" | |
) | |
const ( | |
CUTTING_TIME = 20 |
This file contains hidden or 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
(defn extract-names [seq] | |
(for [lib seq :let [dot-index (.indexOf lib ".")]] | |
(subs lib 0 (- dot-index 2)))) | |
;(println (extract-names ["x-security-1.0.7.jar" "aksis-1.0.jar" "antlr-2.7.6.jar"])) | |
(defn dups [seq] | |
(for [[id freq] (frequencies seq) ;; get the frequencies, destructure | |
:when (> freq 1)] ;; this is the filter condition |
This file contains hidden or 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
Search by timestamp: | |
timestamp:["2014-12-01 00:00:00.000" TO "2014-12-31 00:00:00.000"] |
This file contains hidden or 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
#deb cdrom:[Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2)]/ xenial main restricted | |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted | |
## Major bug fix updates produced after the final release of the | |
## distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted |
This file contains hidden or 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
Prune all branches locally not existing in remote in Git: | |
git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done |
This file contains hidden or 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
//file: provider.tf | |
provider "aws" { | |
region = "us-east-1" | |
} | |
//file: vpc.tf | |
variable "vpc_name" {} | |
data "aws_vpc" "selected" { | |
tags = { |
This file contains hidden or 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
1- Install | |
brew install bash | |
2- List bashes | |
$ which -a bash | |
/usr/local/bin/bash | |
/bin/bash | |
3- Check versions | |
$ /usr/local/bin/bash --version | |
GNU bash, version 5.0.0(1)-release (x86_64-apple-darwin18.2.0) ... | |
$ /bin/bash --version |
OlderNewer