sudo dpkg-reconfigure tzdata
sudo /etc/init.d/cron stop
sudo /etc/init.d/cron start
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 java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import java.util.PriorityQueue; | |
import java.util.Random; | |
import javax.swing.JFrame; | |
import java.awt.Rectangle; | |
import javax.swing.JComponent; | |
import java.awt.Graphics2D; |
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
export type Either<L, A> = Error<L, A> | Success<L, A>; | |
export class Error<L, A> { | |
readonly value: L; | |
constructor(value: L) { | |
this.value = value; | |
} |
set timezones in docker
RUN apk add --no-cache tzdata
ENV TZ=Asia/Almaty
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
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
4 | |
QUESTION | |
4 | |
I've seen this question posed before, but the answers were very vague. I have been doing some research on oplog, and am trying to understand exactly how it works. In particular, I want to have a good understanding of the fields in an oplog document and what data they store. | |
These are the fields I have found through tests and what I think they mean as well as what I am still unsure of: | |
ts: timestamp of the write operation / oplog entry | |
h: a unique identifier for the oplog entry (but why is it sometimes positive and sometimes negative?) |
Setup redirect on another server
http {
upstream newmaltabu {
server 142.93.106.1:443;
}
server {
listen 80 default_server;
server_name _;
return 301 https://$host$request_uri;
setup profiling
db.setProfilingLevel(0)
db.system.profile.drop()
db.createCollection( "system.profile", { capped: true, size:4000000 } )
db.setProfilingLevel(1)
INSTALL TELNET INSIDE CONTAINER
apt-get install telnet
telnet 192.168.80.250 6379
TRUNCATE
truncate -s 0 /var/lib/docker/containers/*/*-json.log;
#accept several values also acepts array of inputs
func add(args ...int) int {
total := 0
for _, v := range args {
total += v
}
return total
}
func main() {
copy files to pod
kubectl cp <some-namespace>/<some-pod>:/tmp/foo /tmp/bar
RESTART pod
kubectl scale deployment algorithm --replicas=0 -n dev
kubectl scale deployment algorithm --replicas=1 -n dev
NewerOlder