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
#!/usr/bin/env bash | |
if [ "$(whoami)" != "root" ]; then | |
echo "You must run this script as root" | |
exit 1 | |
fi | |
apt update | |
apt upgrade | |
apt install apache2 php libapache2-mod-php php-gd \ |
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
#!/usr/bin/env bash | |
echo "-----------------------------------------" | |
echo " Enter a domain name (example: hello.xyz)" | |
echo " Press ENTER" | |
echo "-----------------------------------------" | |
echo | |
read domain_name | |
touch /etc/apache2/sites-available/$domain_name.conf |
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
#!/usr/bin/env bash | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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/bash | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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
/* For styling the rendered Markdown */ | |
* .annotator-hl { | |
background-color: rgba(0, 216, 181, .3) !important; | |
border: 3px solid red !important; | |
} | |
body { | |
font-family: 'Vollkorn', serif !important; | |
margin-bottom: 2em !important; | |
font-size: 1.1em; | |
line-height: 1.5em; |
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
#!/usr/bin/env bash | |
# Author: Dmitri Popov, [email protected] | |
####################################################################### | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
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
<?php | |
if(isset($_POST['submit'])){ | |
// Count total files | |
$countfiles = count($_FILES['file']['name']); | |
// Looping all files | |
for($i=0;$i<$countfiles;$i++){ | |
$filename = $_FILES['file']['name'][$i]; | |
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
function did { | |
dir="$HOME/did/" | |
d="$dir"$(date '+%Y-%m-%d')".md" | |
emacs "$d" --eval "(goto-char (point-max))" | |
} |
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
/* | |
* Sketch: ESP8266_LED_Control_02 | |
* Control an LED from a web browser | |
* Intended to be run on an ESP8266 | |
* | |
* connect to the ESP8266 AP then | |
* use web broswer to go to 192.168.4.1 | |
* | |
*/ | |
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
const int statusPin = LED_BUILTIN; // status LED pin | |
const int flashPin = D1; // flash pin | |
const int ldrPin = A0; // select the input pin for the LDR | |
//const int pwrPin = A3; // power pin | |
int sensorValue = 0; // variable to store the value coming from the LDR | |
void setup() | |
{ | |
pinMode(ldrPin,INPUT); | |
pinMode(statusPin, OUTPUT); |
NewerOlder