$ 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
awk '!(count[$0]++)' old.txt > new.txt
<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 |
$ 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
awk '!(count[$0]++)' old.txt > new.txt
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <queue> | |
#include <stack> | |
#include <algorithm> | |
using namespace std; | |
class Node{ |
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(); |
#include <stdio.h> | |
#include <stdlib.h> | |
#define NUM_VERTEX 10 | |
struct Vertex { | |
char name; | |
int mark; | |
struct Node* list; |
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. |