Skip to content

Instantly share code, notes, and snippets.

View Tikam02's full-sized avatar
:octocat:
Focusing

Tikam Singh Alma Tikam02

:octocat:
Focusing
View GitHub Profile
@Tikam02
Tikam02 / .htaccess
Created August 8, 2022 14:35 — forked from lukecav/.htaccess
Browser caching for Apache
<IfModule mod_expires.c>
ExpiresActive On
# Images
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/avif "access plus 1 year"
ExpiresByType image/avif-sequence "access plus 1 year"
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
## useful refs
* https://realpython.com/deploying-a-django-app-to-aws-elastic-beanstalk/#Create.the.Admin.User
* https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html
## CLI approach
1. Enter your project root (versioned with Git)
2. install awsebcli
2.1 if encountering trouble installing PyYAML, using prepackages wheel:
3. > eb init
54 68 65 20 68 65 78 61 64 65 63 69 6d 61 6c 20 6e 75 6d 65 72 61 6c 20 73 79 73 74 65 6d 2c 20 6f 66 74 65 6e 20 73 68 6f 72 74 65 6e 65 64 20 74 6f 20 22 68 65 78 22 2c 20 69 73 20 61 20 6e 75 6d 65 72 61 6c 20 73 79 73 74 65 6d 20 6d 61 64 65 20 75 70 20 6f 66 20 31 36 20 73 79 6d 62 6f 6c 73 20 28 62 61 73 65 20 31 36 29 2e 20 48 65 78 61 64 65 63 69 6d 61 6c 20 69 73 20 75 73 65 64 20 66 72 6f 6d 20 69 6d 61 67 65 73 20 74 6f 20 74 68 65 20 77 65 62 20 74 6f 20 6d 6f 64 65 72 6e 20 63 72 79 70 74 6f 67 72 61 70 68 79 2e 0a 46 6c 61 67 7b 68 65 78 5f 66 6f 72 5f 61 6c 6c 7d 20
@Tikam02
Tikam02 / wordlist_cleanup.md
Created September 9, 2019 08:34
Wordlist Cleanup commands helpful while bruteforcing and password cracking.

covert a entire wordlist to all lowercase with no garbage.

$ cat dirtyfile.txt | awk '{gsub(/[[:punct:]]/,"")}1' | tr A-Z a-z | sed 's/[0-9]*//g' | sed -e 's/ //g' | strings | tr -cs '[:alpha:]' '\ ' | sed -e 's/ /\n/g' | tr A-Z a-z | sort -u > cleanfile.txt

Remove Duplicates

awk '!(count[$0]++)' old.txt > new.txt

Sort Wordlist by Length

@Tikam02
Tikam02 / bash-cheatsheet.sh
Created November 30, 2016 18:02 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@Tikam02
Tikam02 / graph_search.cpp
Created November 20, 2016 04:36 — forked from douglas-vaz/graph_search.cpp
Breadth First Search and Depth First Search in C++
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>
using namespace std;
class Node{
@Tikam02
Tikam02 / BFSDFS.java
Created November 20, 2016 04:35 — forked from gennad/BFSDFS.java
Breadth-first search and depth-first search Java implementation
Class Main {
public void bfs()
{
// BFS uses Queue data structure
Queue queue = new LinkedList();
queue.add(this.rootNode);
printNode(this.rootNode);
rootNode.visited = true;
while(!queue.isEmpty()) {
Node node = (Node)queue.remove();
@Tikam02
Tikam02 / dfs-bfs.c
Created November 20, 2016 04:34 — forked from dtinth/dfs-bfs.c
#include <stdio.h>
#include <stdlib.h>
#define NUM_VERTEX 10
struct Vertex {
char name;
int mark;
struct Node* list;
@Tikam02
Tikam02 / Graph.java
Created November 19, 2016 21:43 — forked from pxpc2/Graph.java
package us.brtm.cfg;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.LabelNode;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.analysis.*;
import us.brtm.cfg.generic.Node;
/**
* Class that represents a Control Flow Graph constructed for a specified method.