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
@saber13812002
saber13812002 / guzzle_post.php
Created May 1, 2023 19:52 — forked from juampynr/guzzle_post.php
Sample POST request with Guzzle
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'http://example.com',
]);
package de.tdlabs.training.keycloak;
import static java.util.Arrays.asList;
import javax.ws.rs.core.Response;
import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
import org.keycloak.admin.client.Keycloak;
import org.keycloak.admin.client.KeycloakBuilder;
import org.keycloak.representations.idm.CredentialRepresentation;
Install Odoo 13 on Ubuntu 18.04
** MT Software **
sudo apt update && sudo apt upgrade
@saber13812002
saber13812002 / csv2xml4odoo.py
Created October 31, 2022 08:11 — forked from bealdav/csv2xml4odoo.py
Odoo csv / xml converter
# -*- coding: utf-8 -*-
# based on this code
# http://code.activestate.com/recipes/577423-convert-csv-to-xml/
# convert Odoo csv files in xml files
# csv is easy to maintain but xml data have noupdate feature
# Limitations:
# - relation field One2many is NOT supported
# - csv should have 'id' as first column
<odoo>
<record model="report.paperformat" id="paperformat_attendance_recap_report">
<field name="name">paperformat.attendance.recap.report</field>
<field name="default" eval="True"/>
<field name="format">A4</field>
<field name="page_width">0</field>
<field name="page_width">0</field>
<field name="orientation">Portrait</field>
<field name="margin_top">30</field>
<field name="margin_right">5</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
@saber13812002
saber13812002 / index.php
Created November 4, 2021 15:15 — forked from vsoch/index.php
Generate RSS feed for files in a directory folder. Put this file in a folder with files, modify the $allowed_ext variable to customize your extensions, and $feedName, $feedDesc, $feedURL, and $feedBaseURL. Then navigate to the folder on the web to see the xml feed. Done!
<?php
header('Content-type: text/xml');
/*
Runs from a directory containing files to provide an
RSS 2.0 feed that contains the list and modification times for all the
files.
*/
$feedName = "My Audio Feed";
$feedDesc = "Feed for the my audio files in some server folder";
@saber13812002
saber13812002 / composer_path.json
Created June 30, 2021 04:57 — forked from ziadoz/composer_path.json
Composer Using Local Repositories and Branches
{
"repositories": [
{
"type": "path",
"url": "../relative/project/path"
}
],
"require": {
"${project}": "dev-${branch}"
}
@saber13812002
saber13812002 / gist:b89f8e30d489d1644e27101397be76db
Created May 15, 2021 11:21
How can I find the latest commit from forked repos on github?
Intuitive way to view most active fork in GitHub [closed]
javascript:!function(){if(title=document.title,title)if(thing=title.split(/(GitHub\s-\s)*([^:]*)/)[2],thing){var t="https://techgaun.github.io/active-forks/index.html#"+thing;window.open(t)}else window.alert("Not%20a%20valid%20GitHub%20page")}();
@saber13812002
saber13812002 / .env
Created May 4, 2021 19:23
laravel cpanel problem with public_path storage folder voyager نحوه صحیح آپلود فایل در هاست لاراول
// add these two lines into .env
FILESYSTEM_DRIVER=parswebserver
STORAGE_PATH="/home/pardisa2/public_html"