C02STG51GTFM:localstack mpandit$ make infra
. .venv/bin/activate; exec localstack/mock/infra.py
Starting local dev environment. CTRL-C to quit.
Starting local Elasticsearch (port 4571)...
Starting mock ES service (port 4578)...
Starting mock S3 server (port 4572)...
Starting mock SNS server (port 4575)...
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
-- Before importing, you need to create table | |
CREATE TABLE example_table | |
( | |
... | |
); | |
-- Importing... | |
COPY example_table | |
FROM 's3://<BUCKET_NAME>/.../example_table.csv' | |
CREDENTIALS 'aws_access_key_id=...;aws_secret_access_key=...' |
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
echo "$(TZ='Europe/Moscow' date +%Y-%m-%d\ %H\:%M)" | |
# output => 2019-01-31 16:52 |
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
#!/bin/bash | |
export AWS_ACCESS_KEY_ID=... | |
export AWS_SECRET_ACCESS_KEY=... | |
export AWS_DEFAULT_REGION=... | |
PG_HOST=... | |
PG_USER=... | |
PG_PASS='...' | |
PG_DB=... |
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
clear; | |
im = imread('kim.jpg'); | |
ig = rgb2gray(im); | |
[w, h] = size(ig); | |
in = ig; | |
% dinamik gelecek olan maske | |
mask = [1 1 1 ; 1 2 1 ; 1 1 1]; | |
c = size(mask); |
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 com.fasterxml.jackson.databind.AnnotationIntrospector; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair; | |
public final class LoggingObjectMapper extends ObjectMapper { | |
private static final long serialVersionUID = -1620079742091329228L; | |
public LoggingObjectMapper() { | |
super(); |
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 org.apache.commons.collections4.CollectionUtils; | |
import org.apache.commons.collections4.IteratorUtils; | |
import org.apache.commons.lang3.StringUtils; | |
import org.hibernate.query.criteria.internal.path.PluralAttributePath; | |
import org.springframework.data.domain.Page; | |
import org.springframework.data.domain.PageRequest; | |
import org.springframework.data.repository.support.PageableExecutionUtils; | |
import javax.persistence.EntityManager; | |
import javax.persistence.TypedQuery; |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
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 lombok.AllArgsConstructor; | |
import lombok.Data; | |
@Data | |
@AllArgsConstructor | |
public class LazyDeveloper { | |
private String firstName; | |
private String lastName; |
Free O'Reilly books and convenient script to just download them.
Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post
How to use:
- Take the
download.sh
file and put it into a directory where you want the files to be saved. cd
into the directory and make sure that it has executable permissions (chmod +x download.sh
should do it)- Run
./download.sh
and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.