$ git add filename # adding new file; adding changes to the existing file
$ git add -p # adding partial changes; git add --patch (-p)
$ git add -u # include all files in the current index; this includes changed and deleted files,
# but not new ones.
$ git add -A # include all filenames in the index and in the working tree; this stages new
# files as well
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.function.Function; | |
public class CurryingExample { | |
static String f(String a, String b, int c) { | |
return "a=" + a + ", b=" + b + ", c=" + c; | |
} | |
public static void main(String[] args) { |
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/env python | |
""" | |
Very simple HTTP server in python. | |
Usage:: | |
./dummy-web-server.py [<port>] | |
Send a GET request:: | |
curl http://localhost | |
Send a HEAD request:: | |
curl -I http://localhost | |
Send a POST request:: |
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
val dropwizardMetrics = Seq( | |
"metrics-graphite", | |
"metrics-core", | |
"metrics-jvm" | |
).map("io.dropwizard.metrics" % _ % "4.0.5") | |
val logging = "com.typesafe.scala-logging" %% "scala-logging" % "3.9.2" | |
val logback = "ch.qos.logback" % "logback-classic" % "1.2.3" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>pl.softech.example.mvn</groupId> | |
<artifactId>mm-example</artifactId> | |
<version>0.0.1</version> | |
<packaging>pom</packaging> | |
<name>mm-example</name> |
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
# legend | |
^ means ctrl | |
# ctags | |
:!ctags *.m | |
:ta[g][!] tagstring # edit the file containing tagstring | |
:po[p][!] # pop the tagstack by one element | |
:tags |
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
# converting java keystore to .pem | |
# https://www.calazan.com/how-to-convert-a-java-keystore-jks-to-pem-format/ | |
# https://stackoverflow.com/questions/652916/converting-a-java-keystore-into-pem-format | |
rm cert* | |
command apg -m 30 -n 1 > pass.txt | |
keytool -importkeystore \ | |
-srckeystore keystore.jks \ |
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
#!/bin/bash | |
IDEA=`tar -tzf $1 | head -1 | cut -f1 -d"/"` | |
sudo tar -xf $1 -C /opt/ | |
sudo chown $(whoami):$(whoami) /opt/$IDEA -R | |
sudo rm /opt/idea-IU | |
sudo ln -s /opt/$IDEA /opt/idea-IU | |
sudo chown $(whoami):$(whoami) /opt/idea-IU |