Skip to content

Instantly share code, notes, and snippets.

View hamid-ne's full-sized avatar

Hamid Nasr hamid-ne

View GitHub Profile
@hamid-ne
hamid-ne / Boostrap 4 RTL for Laravel.md
Last active July 8, 2021 19:12
Install Boostrap 4 RTL for Laravel

Install Boostrap 4 RTL for Laravel

  1. npm uninstall --save-dev bootstrap-sass

  2. npm install --save-dev rtl-bootstrap popper.js

  3. Find In 'resources/assets/js/bootstrap.js' and Replace

@firatkucuk
firatkucuk / delete-slack-messages.js
Last active May 1, 2024 04:17
Deletes slack public/private channel messages, private chat messages and channel thread replies.
#!/usr/bin/env node
// Channel ID is on the the browser URL.: https://mycompany.slack.com/messages/MYCHANNELID/
// Pass it as a parameter: node ./delete-slack-messages.js CHANNEL_ID
// CONFIGURATION #######################################################################################################
const token = 'SLACK TOKEN';
// Legacy tokens are no more supported.
// Please create an app or use an existing Slack App
@jstott
jstott / paginated.js
Created January 14, 2017 16:22
lodash paginated items
function getPaginatedItems(items, page, pageSize) {
var pg = page || 1,
pgSize = pageSize || 100,
offset = (pg - 1) * pgSize,
pagedItems = _.drop(items, offset).slice(0, pgSize);
return {
page: pg,
pageSize: pgSize,
total: items.length,
total_pages: Math.ceil(items.length / pgSize),
@firstval
firstval / Git_Installation.sh
Last active September 22, 2022 16:44
Installing Git on CentOS 6.7
yum groupinstall "Development Tools"
yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel expat-devel curl-devel
yum install gcc perl-ExtUtils-MakeMaker
yum remove git
wget https://github.com/git/git/archive/v2.5.3.tar.gz -O git.tar.gz
tar -zxf git.tar.gz
cd git-2.5.3
make configure
./configure --prefix=/usr/local
make install
@soheilhy
soheilhy / nginxproxy.md
Last active March 22, 2024 08:54
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@dheerajrav
dheerajrav / gist:3857871
Created October 9, 2012 10:34
Input/Output for cops and robbers

Input/Moves made

First Move: Cop

C
19 19 0 0 0 0 0 0

Output

0 1 0 1 1 0