In order to enable debugging for your Django app running in a Docker container, follow these steps using Visual Studio (Code):
- Add
ptvsd
to your requirements.txt file
ptvsd == 4.3.2
- To your
launch.json
, add this:
emulator -list-avds | cat -n | |
printf "Select AVD: " | |
read index | |
avd=$(emulator -list-avds | sed "${index}q;d") | |
echo "Selected $avd" | |
emulator -netdelay none -netspeed full -avd $avd |
[Unit] | |
Description=Virtual Frame Buffer X Server | |
After=network.target | |
[Service] | |
ExecStart=/usr/bin/Xvfb :42 -screen 0 1x1x24 -ac +extension GLX +render -noreset | |
[Install] | |
WantedBy=multi-user.target |
############################################################ | |
# Dockerfile to build Pentaho EE BA Server container images | |
# Based on Ubuntu 14.04 | |
############################################################ | |
FROM ubuntu:14.04 | |
MAINTAINER Matt Tucker, matthewtckr@gmail.com | |
## Install Base Software | |
RUN apt-get update -y |
-- | |
-- Mostra o andamento de operacoes longas no Oracle. | |
-- | |
select target, sofar, totalwork, ROUND((sofar/totalwork)*100,5) pct_done | |
from v$session_longops | |
where (sid, serial#) in (select sid, serial# | |
from v$session | |
where logon_time > trunc(sysdate)) | |
order by pct_done; |
@Grab( 'org.apache.poi:poi:3.9' ) | |
import static org.apache.poi.ss.usermodel.CellStyle.* | |
import static org.apache.poi.ss.usermodel.IndexedColors.* | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook | |
new HSSFWorkbook().with { workbook -> | |
def styles = [ LIGHT_BLUE, LIGHT_GREEN, LIGHT_ORANGE ].collect { color -> | |
createCellStyle().with { style -> | |
fillForegroundColor = color.index | |
fillPattern = SOLID_FOREGROUND |
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
package main | |
import "code.google.com/p/go-tour/pic" | |
func Pic(dx, dy int) [][]uint8 { | |
// Allocate two-dimensioanl array. | |
a := make([][]uint8, dy) | |
for i := 0; i < dy; i++ { | |
a[i] = make([]uint8, dx) | |
} |