Skip to content

Instantly share code, notes, and snippets.

@pratham2003
pratham2003 / InSigns.java changes.
Created March 2, 2013 06:16
Changes to InSigns.java
private PacketContainer modify(PacketContainer psign, String playerName) {
Packet82UpdateSign incoming = new Packet82UpdateSign(psign);
Packet82UpdateSign outgoing = new Packet82UpdateSign();
String[] lines = incoming.getLines();
String[] newLines = { lines[0], lines[1], lines[2], lines[3] };
String value;
String key;
for (Changer c : changerList) {
Boolean check = false;
for(int i = 0; i < 4; i++) {
var whatsappText = _args['text'].replace(/%25URL%25/,_args['url']).replace(/(%25NL%25)/g,'%0A');
if(window.navigator.appVersion.match(/Chrome\/(.*?) /)[1]) {
var chrome_ver = parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10);
if(chrome_ver > 37 && chrome_ver < 40)
whatsappText = _args['text'].replace(/%25URL%25/,_args['url']).replace(/(%25NL%25)/g,'%20');
}
var twitterText = _args['text'].replace(/%25URL%25/,'').replace(/%25NL%25/g,' ');
@pratham2003
pratham2003 / gist:c4bb4c3e94d951749f5e514f54e280b8
Created December 29, 2017 10:33 — forked from imevro/gist:edfe9dea12196056467f
Clean up all cached pages in prerender.io from console
var cleanUp = function() {
$.ajax({method: "GET", url: "https://prerender.io/api/cached-pages?page=0&pageSize=1000000"}).success(function(response) {
var total = response,
lastChecked = 1;
console.log("total: " + response.length);
for(var i = 0; i < total.length; i++) {
$.ajax({
method: "DELETE",
<?php
// from excel sheet, use sublime of vs code with multicursors
$data = array(
'blender' => 'https://www.amazon.com/Professional-Countertop-1000-Watt-Technology-BL610/dp/B00NGV4506?psc=1&SubscriptionId=AKIAIFTUAUMTXK6MO5UA&tag=orgafact20-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B00NGV4506',
'refrigerator' => 'https://www.amazon.com/Kenmore-Freezer-Refrigerator-Shelves-delivery/dp/B073RLP9B7?psc=1&SubscriptionId=AKIAIFTUAUMTXK6MO5UA&tag=orgafact20-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B073RLP9B7',
'freezer' => 'https://www.amazon.com/Magic-Chef-MCUF3S2-Upright-Stainless/dp/B01GVLWZT0?psc=1&SubscriptionId=AKIAIFTUAUMTXK6MO5UA&tag=orgafact20-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B01GVLWZT0',
'remoska' => 'https://www.amazon.com/Total-Chef-TCCZ02SN-3-Liter-Temperature/dp/B00472MEH4?psc=1&SubscriptionId=AKIAIFTUAUMTXK6MO5UA&tag=orgafact20-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B00472MEH4',
'kettle' => 'https://www.amazon.com/AmazonBasics-Stainles
@pratham2003
pratham2003 / self-signed-certificate-with-custom-ca.md
Created December 15, 2018 06:09 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096