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
server { | |
listen 80; | |
server_name localhost; | |
location /static-content/ { | |
alias /home/user/static-content/; | |
add_header "Access-Control-Allow-Origin" *; | |
add_header Timing-Allow-Origin *; | |
expires 14d; | |
add_header Pragma public; |
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 | |
cd /tmp/ | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13/linux-headers-4.13.0-041300_4.13.0-041300.201709031731_all.deb | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13/linux-headers-4.13.0-041300-generic_4.13.0-041300.201709031731_amd64.deb | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13/linux-image-4.13.0-041300-generic_4.13.0-041300.201709031731_amd64.deb | |
sudo dpkg -i *.deb |
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 -e | |
#title : download-coursera-course.sh | |
#description : Download all lectures and videos from a Coursera class you are enrolled in. | |
#forked from : https://link.medium.com/agVPPIsauT | |
#author : ef0ntan | |
#usage : ./download-coursera-course.sh -c <class-name> -d <download_dir> -i | |
#parameters : | |
# -c : Coursera class name in the URL. For example, for "concurrent-programming-in-java" | |
# Name used in the URL for class: https://www.coursera.org/learn/<CLASS_NAME>/home/welcome | |
# -d : [OPTIONAL] Directory to download clasee files. Default is ~/Coursera/Classes/ |
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
#if ((${PACKAGE_NAME} && ${PACKAGE_NAME} != ""))package ${PACKAGE_NAME} #end | |
#parse("File Header.java") | |
case class ${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
#if ((${PACKAGE_NAME} && ${PACKAGE_NAME} != ""))package ${PACKAGE_NAME} #end | |
#parse("File Header.java") | |
object ${NAME} extends Enumeration { | |
type ${NAME} = Value | |
val ValueOne, ValueTwo = Value | |
def apply(name: String): ${NAME}.Value = name.toLowerCase() match { | |
case "valueone" => ValueOne | |
// ... |
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
javascript:void($('input').attr('onpaste', '')); |
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
Below are the Big O performance of common functions of different Java Collections. | |
List | Add | Remove | Get | Contains | Next | Data Structure | |
---------------------|------|--------|------|----------|------|--------------- | |
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array | |
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List | |
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array | |
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
# https://medium.com/@jgarijogarde/make-bash-on-ubuntu-on-windows-10-look-like-the-ubuntu-terminal-f7566008c5c2 | |
Slot 1: Red: 48, Green: 10, Blue: 36 | |
Slot 2: Red: 114, Green: 159, Blue: 207 | |
Slot 3: Red: 48, Green: 10, Blue: 36 | |
Slot 4: Red: 6, Green: 152, Blue: 154 | |
Slot 5: Red: 204, Green: 0, Blue: 0 | |
Slot 6: Red: 117, Green: 80, Blue: 123 | |
Slot 7: Red: 196, Green: 160, Blue: 0 | |
Slot 8: Red: 211, Green: 215, Blue: 207 |
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 | |
while true; | |
echo -n $(date '+%H:%Mhs ') " " | |
do curl https://banco.santanderrio.com.ar/exec/cotizacion/index.jsp 2> /dev/null | grep \<td\>| sed -n 3p|awk '{ gsub("[<td>\/]*[[:blank:]]*","");print}'; | |
sleep 60; | |
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
# Start from golang base image | |
FROM golang:1.13 as builder | |
# Install git. | |
# Git is required for fetching the dependencies. | |
RUN apk update && apk add --no-cache git | |
# Set the current working directory inside the container | |
WORKDIR /app | |
# Copy files |
OlderNewer