This file contains 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/dd if=/dev/zero of=out.tmp bs=1M count=2048 |
This file contains 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
# force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf | |
server { | |
listen 80; | |
server_name jira.example.com; | |
access_log off; | |
return 301 https://$server_name$request_uri; | |
} | |
# /etc/nginx/conf.d/jira.conf | |
server { |
This file contains 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
/* | |
* Copyright 2016 Thitipong Jampajeen <jampajeen@gmail.com>. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains 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
#include <stdio.h> | |
#include <cstdlib> | |
#define PROGRESS_BAR_STR "=================================" | |
#define PROGRESS_BAR_WIDTH sizeof(PROGRESS_BAR_STR) | |
void print_progress_bar(size_t completed, size_t total) { | |
const char operation[] = "Downloaded"; | |
const char prefix[] = " kMGT"; |
This file contains 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
Query query = session.createSQLQuery(sql); | |
query.setResultTransformer( Transformers.aliasToBean( Test.class) ); | |
List<Test> result = query.list(); |
This file contains 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
#include <getopt.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define OPT1 "Operation1" | |
#define OPT2 "Operation2" | |
struct global_args_t { | |
const char *program_name; |
This file contains 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
+---------------- minute (0 - 59) | |
| +------------- hour (0 - 23) | |
| | +---------- day of month (1 - 31) | |
| | | +------- month (1 - 12) | |
| | | | +---- day of week (0 - 6) (Sunday=0 or 7) | |
| | | | | | |
* * * * * command to be executed |
This file contains 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
Format: ssh -i <path-to-private-key> <link-local-ip> -p 3922 | |
Example: root@faith:~# ssh -i /root/.ssh/id_rsa.cloud 169.254.3.93 -p 3922 |
This file contains 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
<select id="country" name="country" class="full-width" selected="" data-init-plugin="select2"> | |
<option value="AF">Afghanistan</option> | |
<option value="AX">Åland Islands</option> | |
<option value="AL">Albania</option> | |
<option value="DZ">Algeria</option> | |
<option value="AS">American Samoa</option> | |
<option value="AD">Andorra</option> | |
<option value="AO">Angola</option> | |
<option value="AI">Anguilla</option> | |
<option value="AQ">Antarctica</option> |
This file contains 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
#AND | |
<b:if cond='data:blog.pageType == "index"'> | |
<b:if cond='data:blog.searchQuery'> | |
<!--search_page AND index_page--> | |
</b:if> | |
</b:if> | |
#OR |
OlderNewer