Skip to content

Instantly share code, notes, and snippets.

🐒

Dmitri Popov dmpop

🐒
Block or report user

Report or block dmpop

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dmpop
dmpop / multi-file-upload.php
Created Feb 21, 2019
PHP script to upload multiple files
View multi-file-upload.php
<?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];
@dmpop
dmpop / ledctrl.ino
Created Mar 15, 2018
Control LED with NodeMCU in the AP mode
View ledctrl.ino
/*
* 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
*
*/
@dmpop
dmpop / samba-on-pi.sh
Last active Jan 9, 2018
Install Samba on Raspberry Pi
View samba-on-pi.sh
#!/bin/bash
pw="raspberry"
apt install --force-yes samba
apt install --force-yes samba-common-bin
(echo $pw; echo $pw ) | smbpasswd -s -a pi
echo "#======================= Global Settings =======================" > /etc/samba/smb.conf
@dmpop
dmpop / flash-trigger.ino
Created Nov 10, 2017
NodeMCU optical flash trigger
View flash-trigger.ino
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);
View esp8266webserver
/*
* Hello world web server
* circuits4you.com
*/
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
//SSID and Password to your ESP Access Point
const char* ssid = "ESP8266";
@dmpop
dmpop / ap-setup.sh
Last active Oct 11, 2017 — forked from Lewiscowles1986/rPi3-ap-setup.sh
Setting up Raspberry Pi 3 as an access point
View ap-setup.sh
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "This script requires root privileges"
exit
fi
if [[ $# -lt 1 ]];
then echo "Please specify a password"
echo "Usage:"
@dmpop
dmpop / bashrc
Created Jun 26, 2017
PS1 colored prompt
View bashrc
export PS1="\[\e[32m\]\u\[\e[m\]\[\e[32m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\] \[\e[35;40m\]\w\[\e[m\] "
@dmpop
dmpop / neonasms.txt
Last active May 18, 2017
THe doc team bEINg Crateive agiaN
View neonasms.txt
abschnecken
nirgendwas
dement sprechend, dement schweigend
Nussschnecke - Frollein, das zwar nicht clever, aber dafür schön ist
bemitneiden
writearound
Schnexitus
Schnexit
Schneckopocalypse -> Schnec(k)olypse!
clusterfake - Sven's Raspberry Pi 3 Ceph cluster
View writer-friendly.css
@import url('https://fonts.googleapis.com/css?family=Lato');
@import url('https://fonts.googleapis.com/css?family=Inconsolata');
@import url('https://fonts.googleapis.com/css?family=Fira+Mono');
:root
{
/* OVERALL */
--overall-font-color: #d0d0d0;
/* TAGS */
@dmpop
dmpop / show-on-osm.sh
Last active Jan 13, 2017
Show geotagged photo on OpenStreetMap
View show-on-osm.sh
#!/usr/bin/env bash
lat=`exiftool -n -p '$GPSlatitude' $1`
lon=`exiftool -n -p '$GPSlongitude' $1`
osm="http://www.openstreetmap.org/?mlat=$lat&mlon=$lon&zoom=18"
xdg-open $osm
You can’t perform that action at this time.