Use the following configuration in Apache's httpd.conf file or within a virtual host configuration. Note that you should set DocumentRoot
and ServerName
fit to your environment:
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
@echo off | |
goto comment | |
Author: Code Monk | |
Description: This file use to backup the database using PostgreSQL backup utility "pg_dump". | |
Backup parameters should be setup before executing this file | |
File Format flags : | |
c = Custom | |
t = Tar |
Edit: This list is now maintained in the rust-anthology repo.
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 | |
echo "Generating an SSL private key to sign your certificate..." | |
openssl genrsa -des3 -out myssl.key 1024 | |
echo "Generating a Certificate Signing Request..." | |
openssl req -new -key myssl.key -out myssl.csr | |
echo "Removing passphrase from key (for nginx)..." | |
cp myssl.key myssl.key.org | |
openssl rsa -in myssl.key.org -out myssl.key |
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 sys, ldap | |
# DN = [email protected], secret = password, un = username | |
DN, secret, un = sys.argv[1:4] | |
server = "ldap://server.com" | |
port = 389 | |
base = "dc=example,dc=com" | |
scope = ldap.SCOPE_SUBTREE |
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
def find(key, dictionary): | |
for k, v in dictionary.iteritems(): | |
if k == key: | |
yield v | |
elif isinstance(v, dict): | |
for result in find(key, v): | |
yield result | |
elif isinstance(v, list): | |
for d in v: | |
for result in find(key, d): |
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
use std::sync::{Arc, Mutex, Condvar}; | |
use std::thread; | |
struct Producer { | |
cvar: Arc<(Mutex<bool>, Condvar)> | |
} | |
impl Producer { | |
pub fn new(cvar: Arc<(Mutex<bool>, Condvar)>) -> Producer { | |
Producer { |
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 React from 'react' | |
import { Link } from 'react-router' | |
import getRouteHandlerBaseUrl from 'js/helpers/get-route-handler-base-url' | |
class Something extends React.Component { | |
componentWillMount() { | |
this._baseUrl = getRouteHandlerBaseUrl(this.props) | |
} |
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
#[warn(unused_variables)] | |
#[warn(unused_must_use)] | |
use std::thread; | |
fn main(){ | |
let mut c = vec![]; | |
for i in 0..10{ | |
c.push(thread::spawn(move || { | |
println!("thread number {}", i); |
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
use std::time::Duration; | |
use std::sync::Arc; | |
use std::sync::atomic::{AtomicBool, Ordering}; | |
use std::thread; | |
fn main() { | |
// Play with this flag | |
let fatal_flag = true; | |
let do_stop = true; |
NewerOlder