Skip to content

Instantly share code, notes, and snippets.

View getlashified's full-sized avatar

Lashveen Mahabal getlashified

View GitHub Profile
@rickdaalhuizen90
rickdaalhuizen90 / .bashrc
Created February 12, 2017 17:20
Parrot Os bash theme for ubuntu
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@rickdaalhuizen90
rickdaalhuizen90 / permutations.rb
Created November 22, 2017 10:21
Find all the possible permutations using Ruby and recursion Ask
# https://stackoverflow.com/questions/25224321/find-all-the-possible-permutations-using-ruby-and-recursion
$letters = "prtsone"
# Make permutations from letters
def permutation(string)
return [string] if string.size < 2
ch = string[0]
permutation(string[1..-1]).each_with_object([]) do |perm, result|
(0..perm.size).each { |i| result << perm.dup.insert(i,ch) }
@LinuxDevOpsGirl
LinuxDevOpsGirl / anydeskuninstall.sh
Created October 27, 2018 11:57
Uninstall AnyDesk & Install New AnyDesk Ubuntu 16 64 bit Machine
sudo apt-get purge anydesk
sudo apt-get autoclean
sudo apt-get autoremove
sudo apt update
sudo apt list --upgradable
sudo apt upgrade -y
https://download.anydesk.com/linux/anydesk_4.0.0-1_amd64.deb
sudo dpkg -i anydesk_4.0.0-1_amd64.deb
sudo apt install -f
sudo apt update
@rickdaalhuizen90
rickdaalhuizen90 / script.php
Last active June 15, 2024 17:00
PHP script that removes duplicate fields in a csv
<?php
if ($argc < 2) {
exit('Error: No CSV file provided. Example usage: php script.php input.csv' . PHP_EOL);
}
if (pathinfo($argv[1], PATHINFO_EXTENSION) !== 'csv') {
exit('Error: Provided file is not a CSV.' . PHP_EOL);
}