Skip to content

Instantly share code, notes, and snippets.

View darkterminal's full-sized avatar
🕺
Dancing While Coding

Imam Ali Mustofa darkterminal

🕺
Dancing While Coding
View GitHub Profile
@darkterminal
darkterminal / install_lamp_16.sh
Created January 23, 2018 19:09 — forked from ankurk91/install_lamp_ubuntu.sh
Ubuntu 16.04 - PHP development (php 7.1, MySQL 5.7, apache 2.4)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Ubuntu 16.04 Dev Server
# Run like - bash install_lamp.sh
# Script should auto terminate on errors
echo -e "\e[96m Adding PPA \e[39m"
sudo add-apt-repository -y ppa:ondrej/apache2
@darkterminal
darkterminal / php-chmod
Created March 7, 2018 06:01 — forked from jasperf/php-chmod
PHP Script to change file and folder permissions See http://www.webhostingtalk.com/showthread.php?t=218863 #PHP #permissions #chmod
<?php
//http://www.webhostingtalk.com/showthread.php?t=218863
$start_dir = 'whatever'; // Starting directory no trailing slashes.
$perms['file'] = 0644; // chmod value for files don't enclose value in quotes.
$perms['folder'] = 0755; // chmod value for folders don't enclose value in quotes.
function chmod_file_folder($dir) {
global $perms;
$dh=@opendir($dir);
;[program:theprogramname]
;command=/bin/cat ; the program (relative uses PATH, can take args)
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
;numprocs=1 ; number of processes copies to start (def 1)
;directory=/tmp ; directory to cwd to before exec (def no cwd)
;umask=022 ; umask for process (default None)
;priority=999 ; the relative start priority (default 999)
;autostart=true ; start at supervisord start (default: true)
;autorestart=true ; retstart at unexpected quit (default: true)
;startsecs=10 ; number of secs prog must stay running (def. 1)
@darkterminal
darkterminal / sources.list
Created July 6, 2018 06:23 — forked from jcanfield/sources.list
Ubuntu 16.10 Sources for APT
# Ubuntu Sources List Generator
>>> NEWS: Now available on SSL
>>> Replace your /etc/apt/sources.list with the following one. For adding GPG keys of new repos, see instruction (if available) in the sources.list below itself.
## curl https://repogen.simplylinux.ch/txt/yakkety/sources_dccbf34a40895c1d9b7a7e7d24ee21dbbbccc385.txt | sudo tee /etc/apt/sources.list
#------------------------------------------------------------------------------#
# OFFICIAL UBUNTU REPOS #
@darkterminal
darkterminal / webdev_online_resources.md
Created July 16, 2018 14:59 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@darkterminal
darkterminal / rest_quick_reference.md
Created August 24, 2018 01:32 — forked from odan/rest_quick_reference.md
REST, RESTful API Quick Reference

REST, RESTful API Quick Reference

A good API is not just easy to use but also hard to misuse.

Ressources

  • Version your API
    • Path: /v1/users
    • Subdomain: api.v1.example.com/users
@darkterminal
darkterminal / addToGoogleCalendar.php
Created September 19, 2018 14:05 — forked from axwax/addToGoogleCalendar.php
add event to google calendar
<?php
// add event to google calendar
echo '<a href="' . addToGoogleCalendar("Let's test this", "next wednesday 2pm", "next wednesday 4pm", "right here, right now", "bla blah rhubarb http://axwax.de") . '">next weds 2pm</a><br/>';
echo '<a href="' . addToGoogleCalendar("Breakfast at Tiffany's", "tomorrow 8am") . '">Breakfast at Tiffany\'s</a>';
function addToGoogleCalendar($title='', $startdate='', $enddate='', $location='', $details='')
{
$startdate = ($startdate ? $startdate : time());
$startdate = (is_numeric($startdate) ? $startdate : strtotime($startdate));
@darkterminal
darkterminal / jp-ur.json
Created November 30, 2018 05:15 — forked from romeryto/jp-ur.json
jp-ur.json
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@darkterminal
darkterminal / media-query.css
Created December 29, 2018 15:22 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@darkterminal
darkterminal / docker-help.md
Created January 19, 2019 16:53 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info