Skip to content

Instantly share code, notes, and snippets.

View jeevansrivastava's full-sized avatar
:octocat:
write, the codes

Jeevan Srivastava jeevansrivastava

:octocat:
write, the codes
View GitHub Profile
@jeevansrivastava
jeevansrivastava / README.md
Created April 8, 2021 06:47 — forked from arikfr/README.md
Setting up HTTPS with LetsEncrypt for Redash Docker Deployment
  1. Make sure the domain you picked points at the IP of your Redash server.
  2. Switch to the root user (sudo su).
  3. Create a folder named nginx in /opt/redash.
  4. Create in the nginx folder two additional folders: certs and certs-data.
  5. Create the file /opt/redash/nginx/nginx.conf and place the following in it: (replace example.redashapp.com with your domain name)
    upstream redash {
        server redash:5000;
    }
    
public function compare()
{
session(['orderid' => app('request')->input('id')]);
$order = Order::find(session('orderid'));
$subscribed = false;
$ordersObj = OrderDetail::with('product')->whereOrderId($order->id)->get();
$orders = $ordersObj->toArray();
$orderedProductsCategories = array_column(array_column($orders, 'product'), 'category_id');
if($order->status == 'order_placed') {
return redirect()->route('order.index')->with('error', \Lang::get('messages.can_not_be_changed'));
@jeevansrivastava
jeevansrivastava / AesCipher.java
Created November 12, 2018 11:02 — forked from demisang/AesCipher.java
AES/CBC/PKCS5Padding encrypt/decrypt PHP and JAVA example classes
import android.support.annotation.Nullable;
import android.util.Base64;
import java.nio.ByteBuffer;
import java.security.SecureRandom;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
@jeevansrivastava
jeevansrivastava / redis_cheatsheet.bash
Created November 1, 2018 07:09 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.