Skip to content

Instantly share code, notes, and snippets.

View proxium's full-sized avatar
🍒
Picking some sweet cherries

Rateb BEN MOUSSA proxium

🍒
Picking some sweet cherries
View GitHub Profile
@proxium
proxium / Whatsapp-Android-To-iOS-Importer.md
Last active May 1, 2024 12:23
How do I transfer WhatsApp from Android to iOS without phone rooting? [verified method 24-Oct-2020]

Initially based on https://github.com/residentsummer/watoi

Migrate Whatsapp chats history from Android to iOS.

Caveats

Media files and shared locations are not imported (got placeholders instead)

Messages from contacts that changed ids (phone numbers) are not linked

@proxium
proxium / increase-replication-factor.js
Last active December 18, 2019 15:58 — forked from ducas/increase-replication-factor.js
Increase Replication Factor for Kafka Topics
/*
* This script reads the existing partition assignments in JSON (exported using kafka-reassign-partitions.sh) and generates
* the appropriate reassignment JSON file for input to kafka-reassign-partitions.sh.
*
*/
var usage = `
Usage: node increase-replication-factory.js (brokers) (replication factor) (current assignment file) (output file) [-f]
* brokers: comma separated list of brokers
* replication factor: the new replication factor to use
@proxium
proxium / intro-latest-widevine.md
Created February 6, 2019 17:15 — forked from ruario/intro-latest-widevine.md
Fetches the latest Linux Widevine binary so that it can be used by Vivaldi.

With the release of Vivaldi 2.2, this page is now obsolete and unmaintained. Widevine is fetched automatically on post install of our official packages. The information below and the script are left for historical reasons but will not be updated.


Summary

A bunch of people asked how they could use this script with pure Chromium on Ubuntu. The following is a quick guide. Though I still suggest you at least try Vivaldi. Who knows, you might like it. Worried about proprietary componants? Remember that libwidevinecdm.so is a binary blob you are taking from Chrome, so by following this guide you will have already made your distro less "pure". Also all our additions to the Chromium base are open source and our UI, while not open, is written in HTML/CSS/JS. Thus you can see exactly what we are doing (no funny business).

If you still want to run Chromium, the following explains how it is done.

@proxium
proxium / aws-ec2-php7.2-script.sh
Last active October 17, 2020 09:14
Install PHP 7 on AWS EC2 Linux Instance
# Pick the topic name or number from the list below
#sudo amazon-linux-extras list
# 0 ansible2 disabled [ =2.4.2 ]
# 1 emacs disabled [ =25.3 ]
# 2 memcached1.5 disabled [ =1.5.1 ]
# 3 nginx1.12 disabled [ =1.12.2 ]
# 4 postgresql9.6 disabled [ =9.6.6 ]
# 5 python3 disabled [ =3.6.2 ]
# 6 redis4.0 disabled [ =4.0.5 ]
@proxium
proxium / Dockerfile
Created February 21, 2018 17:01
Dockerfile for nginx compiled from source on debian jessie image with lua-nginx-module and echo-nginx-module
FROM buildpack-deps:jessie
RUN curl -L -o /tmp/nginx_signing.key http://nginx.org/keys/nginx_signing.key && \
apt-key add /tmp/nginx_signing.key && \
echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list && \
echo "deb-src http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list
# lua-nginx-module only supports nginx <=1.11.2
ENV NGINX_VERSION 1.11.2
ENV NGINX_FULL_VERSION ${NGINX_VERSION}-1~jessie
@proxium
proxium / export_commit_files.sh
Created March 9, 2016 17:56
export files form a specific commit
git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT <commit ID ex:b9e0245> | tar -czf file.tgz -T -
@proxium
proxium / layout_xml_via_event.php
Created March 2, 2016 11:31
Magento: add layout xml via event to add the layout file direct before local.xml
<?php
/*
config.xml
<?xml version="1.0"?>
<config>
<modules>
<Loewenstark_Layout>
<version>1.0.0.0</version>
</Loewenstark_Layout>
</modules>
@proxium
proxium / Show_Product_Count_Per_Category.php
Last active October 27, 2020 17:49
Product Count Per Category in Magento
<?php
/**
* @param $category
* @return int
*/
public function getProductCount($category)
{
$productTable = Mage::getSingleton('core/resource')->getTableName('catalog/category_product');
@proxium
proxium / magento_dummy_simple_products_generation.php
Last active May 8, 2018 17:39
You need to put this script under shell/ directory in you Magento folder and adjust the constants to sweet your needs.
<?php
// env config
ini_set('display_errors', 1);
umask(0);
// mage setup
require_once dirname(__FILE__).'/../app/Mage.php';
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
@proxium
proxium / bumpversion.sh
Created December 1, 2015 11:41 — forked from pete-otaqui/bumpversion.sh
Bump a software project's VERSION, add the CHANGES, and tag with GIT
#!/bin/bash
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3"
# this script will display the current version, automatically
# suggest a "minor" version update, and ask for input to use
# the suggestion, or a newly entered value.