Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# coding=utf-8 | |
#https://www.google.com/settings/security/lesssecureapps | |
def sendCorreo(remitente, contrasenna, destinatario, asunto, mensaje, cantidadEnvios): | |
import smtplib | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
msg = "\r\n".join([ | |
"From:" + remitente , | |
"To:" + destinatario, |
ls -l | awk '{k=0;for(i=0;i<=8;i++)k+=((substr($1,i+2,1)~/[rwx]/) \ | |
*2^(8-i));if(k)printf("%0o ",k);print}' |
var https = require('https'); | |
var fs = require('fs'); | |
var options = {'host': 'localhost', | |
'path':'/path/to/file', | |
'auth': 'user:password', | |
'headers':{'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0'} | |
}; | |
var file = fs.createWriteStream("file.zip"); | |
var request = https.request(options, function (response) { | |
console.log('STATUS: ' + response.statusCode); |
public class HierarchyEnum { | |
public interface Fruit {} | |
public static enum RedFruit implements Fruit{ | |
RED_APPLE, TOMATOE; | |
} | |
public static enum OrangeFruit implements Fruit{ | |
ORANGE, PAPAYA; |
public class MilisecondToDate { | |
public final long MILISECONDS_PER_YEAR = 31536000000L; | |
public final long MILISECONDS_PER_DAY = 86400000L; | |
public final long MILISECONDS_PER_HOUR = 3600000L; | |
public final long MILISECONDS_PER_MINUTE = 60000L; | |
public final long MILISECONDS_PER_SECONDS = 1000L; | |
public final int FIRST_YEAR = 1970; | |
#!/bin/sh | |
# this hook is in SCM so that it can be shared | |
# to install it, create a symbolic link in the projects .git/hooks folder | |
# | |
# i.e. - from the .git/hooks directory, run | |
# $ ln -s ../../git-hooks/pre-commit.sh pre-commit | |
# | |
# to skip the tests, run with the --no-verify argument | |
# i.e. - $ 'git commit --no-verify' |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
function mergesort(list){ | |
if(list.length > 1){ | |
let middle = list.length/2 | |
return merge(mergesort(list.slice(0, middle)), mergesort(list.slice(middle, list.length))) | |
}else{ | |
return list | |
} | |
} | |
function merge(listA, listB){ |
package hackerrang; | |
import java.io.FileWriter; | |
import java.util.Arrays; | |
import java.util.PriorityQueue; | |
import java.util.Random; | |
public class Lista { | |
public static void main(String[] args) { |