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
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
--- nautilus-3.8.2/libnautilus-private/nautilus-search-directory.c.orig 2013-07-04 17:39:05.893879085 +0900 | |
+++ nautilus-3.8.2/libnautilus-private/nautilus-search-directory.c 2013-07-04 17:39:12.226879030 +0900 | |
@@ -171,7 +171,7 @@ | |
nautilus_search_engine_model_set_model (model_provider, search->details->base_model); | |
simple_provider = nautilus_search_engine_get_simple_provider (search->details->engine); | |
- g_object_set (simple_provider, "recursive", TRUE, NULL); | |
+ g_object_set (simple_provider, "recursive", FALSE, NULL); | |
reset_file_list (search); |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
#!/usr/bin/perl | |
use Mysql; | |
use strict; | |
use vars qw($school_name); | |
use vars qw($pass); | |
require "./cgi-lib.pl"; |
WebSockets is a modern HTML5 standard which makes communication between client and server a lot more simpler than ever. We are all familiar with the technology of sockets. Sockets have been fundamental to network communication for a long time but usually the communication over the browser has been restricted. The general restrictions
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)chrome.webRequest.onHeadersReceived.addListener( | |
function (details) { | |
for (var i = 0; i < details.responseHeaders.length; ++i) { | |
if (details.responseHeaders[i].name.toLowerCase() == 'x-frame-options') { | |
details.responseHeaders.splice(i, 1); | |
return { | |
responseHeaders: details.responseHeaders | |
}; | |
} | |
} |
apt-get install msmtp ca-certificates | |
vim /etc/msmtprc | |
# Set defaults. | |
defaults | |
# Enable or disable TLS/SSL encryption. | |
tls on | |
tls_starttls on | |
tls_trust_file /etc/ssl/certs/ca-certificates.crt |
// $ scala-2.11.5 -Xexperimental | |
// Original Java 8 version: http://winterbe.com/posts/2014/07/31/java8-stream-tutorial-examples/ | |
scala> import java.util.{Arrays, List, ArrayList} | |
scala> import java.util.stream.{Stream, IntStream} | |
// List<String> myList = Arrays.asList("a1", "a2", "b1", "c2", "c1"); | |
scala> val myList = Arrays.asList("a1", "a2", "b1", "c2", "c1") |
/** | |
* Read evolution files from the application environment. | |
*/ | |
@Singleton | |
class EvolutionsReader @Inject() (environment: Environment) { | |
/** | |
* Read the application evolutions. | |
* | |
* @param db the database name |