Skip to content

Instantly share code, notes, and snippets.

View saber13812002's full-sized avatar
💭
stackoverflow+codegrepper.com

Saber tabatabaee yazdi saber13812002

💭
stackoverflow+codegrepper.com
View GitHub Profile
FROM liararepo/laravel-platform:frontend
FROM liararepo/laravel-platform:backend
RUN chgrp -R www-data /var/www/html/lib/vendor
RUN chmod -R ug+rwx /var/www/html/lib/vendor
@mhemrg
mhemrg / Dockerfile
Last active March 24, 2019 10:50
Liara | Laravel platform without npm
FROM thecodingmachine/php:7.2-v2-apache-node8
ENV APACHE_DOCUMENT_ROOT=/public \
TEMPLATE_PHP_INI=production \
PHP_EXTENSIONS="amqp bcmath calendar exif gd gettext \
gmp gnupg igbinary imagick imap intl ldap mcrypt memcached \
mongodb pcntl pdo_dblib pdo_pgsql pgsql sockets yaml"
USER root
@mhemrg
mhemrg / wp-config.php
Created March 4, 2019 18:39
Liara - Wordpress HTTPS config
<?php
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
}
@mhemrg
mhemrg / Dockerfile
Created January 25, 2019 20:36
Nodejs + puppeteer + docker
FROM liararepo/node-platform
RUN apt-get update \
# See https://crbug.com/795759
&& apt-get install -yq libgconf-2-4 \
# Install latest chrome dev package, which installs the necessary libs to
# make the bundled version of Chromium that Puppeteer installs work.
&& apt-get install -y wget --no-install-recommends \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
Widget:
Widget is different or alternate representation to display a screen, fields and attributes in odoo.
Widget allows to change view using different rendering templates and also allows to design as you want.
Example:
widget_name.js
@Bengejd
Bengejd / 1. autoplay-video.directive.ts
Last active April 30, 2020 16:51
Ionic - Auto play/pause videos on scroll.
import { Directive } from '@angular/core';
@Directive({
selector: 'video'
})
export class AutoplayVideoDirective { }
@manzoorwanijk
manzoorwanijk / README.md
Last active December 23, 2023 01:42
Google Script to bypass the blockage of Telegram Bot API from by webhost

WPTelegram Google Script

You can use this script to bypass the bans on Telegram API by different hosts. Simply send the request to this script instead of the Telegram Bot API after deploying it as a web app and allowing anonymous access.

Params

It accepts bot GET and POST requests with the following params

name type Description
@rszeto
rszeto / *pycharm-setup-2020.3.2.md
Last active March 31, 2024 07:28
Setting up PyCharm project with remote interpreter

Setting up PyCharm project with remote interpreter

Setting up a remote interpreter on PyCharm is awfully unintuitive. I've pared it down to what I think is the minimal number of steps, and leaves the fewest number of deployment configurations and Python interpreters lying around. This is designed for my specific configuration (specifically PyTorch); adapt as needed.

Configuring default project (only do after installing PyCharm for the first time):

  1. (Optional) Add virtual environment path to excluded files
    1. From Welcome Page, go to Configure > Settings > Build, Execution, Deployment > Deployment > Options
    2. Add virtualenv path. For example, if you always have the project's virtualenv in .env, add ";.env" to the "Exclude items by name" field
[options]
#
# WARNING:
# If you use the Odoo Database utility to change the master password be aware
# that the formatting of this file WILL be LOST! A copy of this file named
# /etc/odoo/openerp-server.conf.template has been made in case this happens
# Note that the copy does not have any first boot changes
#-----------------------------------------------------------------------------
# Odoo Server Config File - TurnKey Linux
function word_count() {
$content = get_post_field( 'post_content', $post->ID );
$word_count = str_word_count( strip_tags( $content ) );
return $word_count;
}