This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Easily add roles from Discord users when they add a specific reactions using discord.js v14.14.1. (discord.js 14+) | |
*/ | |
const { Client, Events, GatewayIntentBits, Partials } = require('discord.js'); | |
const client = new Client({ | |
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageReactions], | |
partials: [Partials.Message, Partials.Channel, Partials.Reaction], | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Easily remove roles from Discord users when they remove specific reactions using discord.js v14.14.1. (discord.js 14+) | |
*/ | |
const { Client, Events, GatewayIntentBits, Partials } = require('discord.js'); | |
const client = new Client({ | |
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageReactions], | |
partials: [Partials.Message, Partials.Channel, Partials.Reaction], | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Custom thank you message after order is placed to show to the customer in woocommerce. | |
*/ | |
add_filter( 'woocommerce_thankyou_order_received_text', 'holikau_custom_ty_msg' ); | |
function holikau_custom_ty_msg ( $thank_you_msg ) { | |
$thank_you_msg = 'Thank you for placing an order with us! Our Customer Care Executive will review your order & get in touch with you shortly regarding your date & time of delivery. Incase you want to make changes to your order please call +91-9849427575!'; | |
return $thank_you_msg; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo code --user-data-dir="~/.vscode-root" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ name: "Afghanistan" }, | |
{ name: "Albania" }, | |
{ name: "Algeria" }, | |
{ name: "Andorra" }, | |
{ name: "Angola" }, | |
{ name: "Antigua and Barbuda" }, | |
{ name: "Argentina" }, | |
{ name: "Armenia" }, | |
{ name: "Australia" }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.util.*; | |
public class RemoveDuplicates{ | |
public static void main(String []args){ | |
String s = "aabnsbsbsssbbsbsbs"; | |
char[] characters = s.toCharArray(); | |
Set<Character> newSet = new LinkedHashSet<Character>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ReverseString{ | |
public static void main(String []args){ | |
String myString = "this is the test"; | |
System.out.println(reverse(myString)); | |
} | |
public static String reverse(String str){ | |
System.out.println("Original Length " + str.length()); | |
char[] data = str.toCharArray(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ReverseString{ | |
public static void main(String []args){ | |
String myString = "this is the test"; | |
System.out.println(reverse(myString)); | |
} | |
public static String reverse(String str){ | |
System.out.println("Original Length " + str.length()); | |
char[] data = str.toCharArray(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**This is the new best way to upgrade npm on Windows.** | |
**Run PowerShell as Administrator** | |
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force | |
npm install -g npm-windows-upgrade | |
npm-windows-upgrade | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$encrypted_password = 'ENCRYPTED_PASSWORD_HERE'; | |
$key = 'KEY_FROM_CONFIG_FILE_HERE'; | |
$decrypted_string = $this->encrypt->decode($encrypted_password, $key); | |
echo $decrypted_string; | |
?> |
NewerOlder