Skip to content

Instantly share code, notes, and snippets.

@coresh
coresh / extract_cookies.sh
Created September 18, 2025 07:31 — forked from hackerb9/extract_cookies.sh
Extract cookies.sqlite to cookies.txt for use in wget or curl.
#!/bin/bash -e
# extract_cookies.sh:
#
# Convert from Firefox's cookies.sqlite format to Netscape cookies,
# which can then be used by wget and curl. (Why don't wget and curl
# just use libsqlite if it's installed?)
# USAGE:
#
# $ extract_cookies.sh > /tmp/cookies.txt
@coresh
coresh / passwordGenerator.c
Created June 8, 2025 16:57 — forked from sahil-patel6/passwordGenerator.c
Password Generator Using C Language
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
char passwordType[1];
int generateRandomNumbers();
char password[512];
@coresh
coresh / example_feed_xml_rss.xml
Created May 10, 2025 20:09 — forked from marcosnakamine/example_feed_xml_rss.xml
Google Merchant - Feed example in xml
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<rss xmlns:g="http://base.google.com/ns/1.0" version="2.0">
<channel>
<title>Example - Online Store</title>
<link>http://www.example.com</link>
<description>
This is a sample feed containing the required and recommended attributes for a variety of different products
</description>
<!--
First example shows what attributes are required and recommended for items that are not in the apparel category

Create a file called abstract.php and place it in your root Magento folder:

abstract.php
<?php
use \Magento\Framework\AppInterface as AppInterface;
use \Magento\Framework\App\Http as Http;

use Magento\Framework\ObjectManager\ConfigLoaderInterface;
use Magento\Framework\App\Request\Http as RequestHttp;
@coresh
coresh / GoogleDorking.md
Created November 26, 2024 09:58 — forked from sundowndev/GoogleDorking.md
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@coresh
coresh / _OpenVPN Server for LAN Access only.md
Created November 20, 2024 18:07 — forked from GlitchWitch/_OpenVPN Server for LAN Access only.md
OpenVPN Server for LAN Access only (no internet forwarding)

How to setup an OpenVPN server for LAN Access only

Install OpenVPN

wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh

Edit server.conf

/etc/openvpn/server/server.conf

Change the OpenVPN LAN address to prevent interfering with other OpenVPN connections

@coresh
coresh / permute.c
Created November 4, 2024 11:44 — forked from mrjohndcarter/permute.c
Generate permutations of an array of characters (in C).
/* permutations of an array of characters */
#include <stdio.h>
void permute(int n, int size, char array[])
{
char tmp;
int i, j;
if (n == 1) {
for (i = 0; i < size; i++)
@coresh
coresh / combos.php
Created November 4, 2024 11:21 — forked from farinspace/combos.php
Recursive functions, I can never find exactly what I need in a pinch
<?php
function combos($data, &$all = array(), $group = array(), $val = null, $i = 0) {
if (isset($val)) {
array_push($group, $val);
}
if ($i >= count($data)) {
array_push($all, $group);
} else {
foreach ($data[$i] as $v) {
@coresh
coresh / varnish6.vcl
Created October 21, 2024 07:23 — forked from peterjaap/varnish6.vcl
Updated Magento 2 Varnish 6 VCL, in cooperation with Varnish Software
# A number of these changes come form the following PR's; , combines changes in https://github.com/magento/magento2/pull/29360, https://github.com/magento/magento2/pull/28944 and https://github.com/magento/magento2/pull/28894, https://github.com/magento/magento2/pull/35228, https://github.com/magento/magento2/pull/36524, https://github.com/magento/magento2/pull/34323
# VCL version 5.0 is not supported so it should be 4.0 even though actually used Varnish version is 6
vcl 4.1;
import std;
# The minimal Varnish version is 6.0
# For SSL offloading, pass the following header in your proxy server or load balancer: '/* {{ ssl_offloaded_header }} */: https'
backend default {
.host = "/* {{ host }} */";
@coresh
coresh / gist:fecb264bae9853f5ea772155b85b7d1e
Created September 28, 2024 15:41 — forked from luckydev/gist:b2a6ebe793aeacf50ff15331fb3b519d
Increate max no of open files limit in Ubuntu 16.04/18.04 for Nginx
# maximum capability of system
user@ubuntu:~$ cat /proc/sys/fs/file-max
708444
# available limit
user@ubuntu:~$ ulimit -n
1024
# To increase the available limit to say 200000
user@ubuntu:~$ sudo vim /etc/sysctl.conf