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
## DATABASE MIGRATIONS | |
set -eu | |
# Run database migrations | |
sudo venvs/django/bin/python manage.py makemigrations | |
sudo venvs/django/bin/python manage.py migrate | |
#create application super user | |
sudo venvs/django/bin/python manage.py createsuperuser |
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
SetEnv APPLICATION_SERVER_ADMIN [email protected] | |
SetEnv APPLICATION_DOMAIN_NAME originality.eastus.cloudapp.azure.com | |
SetEnv APPLICATION_ROOT_DIR /var/originality-integration-fiverr | |
SetEnv WSGID_PROCESS_NAME originality_app_process_name | |
<VirtualHost *:80> | |
ServerAdmin ${APPLICATION_SERVER_ADMIN} | |
ServerName ${APPLICATION_DOMAIN_NAME} | |
DocumentRoot ${APPLICATION_ROOT_DIR} | |
ErrorLog ${APACHE_LOG_DIR}/originality_error.log |
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 | |
## BASE INSTALLATION | |
# Update package lists | |
sudo apt-get update | |
# Install necessary packages | |
sudo apt-get install apache2 # Apache HTTP Server | |
sudo apt-get install apache2-dev # Apache development headers and module support |
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
[Unit] | |
Description=AutoSSH tunnel service everythingcli MySQL on local port 5000 | |
After=network.target | |
[Service] | |
Environment="AUTOSSH_GATETIME=0" | |
ExecStart=/usr/bin/autossh -p 64371 -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -NL 5000:localhost:3306 root@target_server | |
[Install] | |
WantedBy=multi-user.target |
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
<?php | |
namespace App\Http\Controllers; | |
use App\Models\Voter; | |
use Illuminate\Http\Request; | |
class VoterController extends Controller | |
{ | |
/** |
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
<div class="alert alert-info font-weight-bold"> | |
<p>To secure your place, kindly pay full fees by 31 May 2020.</p> | |
<p>How to download acceptance letter</p> | |
<ul> | |
<li>Create your elearning account at <a href="https://elearning.msu.ac.zw/login/create_account" target="_blank">https://elearning.msu.ac.zw/login/create_account</a></li> | |
<li>Login to your new elearning account</li> | |
<li>On your elearning dashboard click the "Download Acceptance Letter" button to dowload your acceptance letter</li> | |
</ul> | |
</div> |
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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
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
<?php | |
$id = the_ID(); | |
while ( have_posts() ) : the_post(); | |
$gp_args = array( | |
'post_type' => 'page', | |
'post_parent' => $id, | |
'order' => 'ASC', | |
'orderby' => 'menu_order', | |
'posts_per_page' => -1 | |
); |
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
#include <stdio.h> | |
int main(int argc, char * argv[]){ | |
int ages[]={12,56,23,34,51}; | |
char *name[]={"blessing","tawanda","prosper","simba","titi"}; | |
int count=sizeof(ages)/sizeof(int); | |
int i=0; |
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
# include <stdio.h> | |
int main(int argc, char * argv[]){ | |
int i=0; | |
// go through each string in argv | |
// why am I skipping argv[0]? | |
for(i = 1; i < argc; i++) { | |
printf("arg %d: %s\n", i, argv[i]); |
NewerOlder