Skip to content

Instantly share code, notes, and snippets.

View dark452's full-sized avatar
🎯
Focusing

dark452

🎯
Focusing
View GitHub Profile
@gdespirito
gdespirito / 2017_11_21_144804_create_regions_table.php
Last active February 23, 2023 17:55
Comunas y regiones de Chile - 2017 | Migraciones y Seeders para Laravel
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateRegionsTable extends Migration
{
/**
* Run the migrations.
@sanjeevshrestha
sanjeevshrestha / telegraf-dockercompose.yml
Last active July 24, 2022 01:12
Telegraf Docker Compose file
telegraf:
image: telegraf
restart: always
environment:
HOST_PROC: /rootfs/proc
HOST_SYS: /rootfs/sys
HOST_ETC: /rootfs/etc
hostname: localhost
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
@jasondavis
jasondavis / reboot_mysql_database.php
Last active December 12, 2020 01:34
Start / Stop / Reboot MySQL Database server using SSH with PHP
<?php
// Start / Stop / Reboot MySQL Database server using SSH with PHP
// Requires the library from phpseclib.sourceforge.net / https://github.com/phpseclib/phpseclib
// Server user login data
$ssh_user = '';
$ssh_password = '';
$ssh_server_ip = '';
?>
<!DOCTYPE html>
@louisbl
louisbl / docker-compose.yml
Last active May 22, 2020 10:42
docker-compose with db persistence
data:
image: debian:jessie
user: www-data
volumes:
- ./src:/var/www/
web:
image: php:5.6-apache
links:
- db
@damianorenfer
damianorenfer / rshutdown.sh
Last active September 10, 2016 08:06
Bash shutdown script over SSH (Unix) and/or Telnet (Windows).
#!/bin/bash
# usage : ./rshutdown.sh host user password
host=$1
username=$2
password=$3
#SSH, requires sshpass package installed
sshpass -p "$password" ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $username@$host "echo $password | sudo -S poweroff" > /dev/null 2>&1
@juque
juque / MySQL-Chile:regiones-provincias-comunas
Created July 6, 2010 19:32
Chile: Regiones, Provincias, Comunas
/* Estructura y Datos de las Regiones, Provincias */
/* y Comunas de Chile. */
/* */
/* Fecha: Julio 2010 */
/* Autor: Juan Pablo Aqueveque - juque.cl */
--
-- Comunas
--
DROP TABLE IF EXISTS `comunas`;