Skip to content

Instantly share code, notes, and snippets.

Avatar
💡
Githubing....

devlim devlim

💡
Githubing....
View GitHub Profile
@devlim
devlim / worker.js
Created Jul 24, 2020 — forked from maxkostinevich/worker.js
Serverless Geolocation Service
View worker.js
/*
* Serverless Geolocation Service, hosted on Cloudflare Workers.
*
* Learn more at https://maxkostinevich.com/blog/serverless-geolocation
*
* (c) Max Kostinevich / https://maxkostinevich.com
*/
// https://gist.github.com/maephisto/9228207
@devlim
devlim / How to Docker without sudo.md
Created Dec 21, 2019
How to Docker without sudo
View How to Docker without sudo.md

Run Docker commands without sudo

1. Add the docker group if it doesn't already exist
$ sudo groupadd docker
2. Add the connected user $USER to the docker group
View console-function-names.js
const bypass = [
// function names to avoid logging
];
const collapsed = [
// function names to groupCollapsed
];
module.exports = function(babel) {
const { types: t } = babel;
const wrapFunctionBody = babel.template(`{
@devlim
devlim / ext.txt
Created Sep 29, 2019 — forked from chronon/ext.txt
List of docker-php-ext-install extension names
View ext.txt
Possible values for ext-name:
bcmath
bz2
calendar
ctype
curl
dba
dom
enchant
@devlim
devlim / php-docker-ext
Created Sep 29, 2019 — forked from hoandang/php-docker-ext
Complete list of php docker ext
View php-docker-ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
@devlim
devlim / git tutorials.md
Created May 25, 2019 — forked from jaseemabid/git tutorials.md
Awesome git tutorials I am finding here and there
View git tutorials.md
View wp-query-ref.php
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@devlim
devlim / php.ini
Created Apr 17, 2017
php.ini Backup default /etc/php/7.0/apache2/php.ini
View php.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@devlim
devlim / 000-default.conf
Last active Mar 25, 2021
Apache default virtual host file, default ssl conf file. /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/default-ssl.conf
View 000-default.conf
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
@devlim
devlim / gist:a6258e2e8823e5470ee800c4724cf2b0
Created Mar 13, 2017
Nginx default server block (/etc/nginx/sites-available/default)
View gist:a6258e2e8823e5470ee800c4724cf2b0
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#