Skip to content

Instantly share code, notes, and snippets.

View pooria-h's full-sized avatar
💭
I may be slow to respond.

Pooria Hannani pooria-h

💭
I may be slow to respond.
View GitHub Profile
@mixin clearfix-micro() {
& {
*zoom: 1;
}
&:before,
&:after {
content: "";
display: table;
}
&:after {
@josephwegner
josephwegner / documentation.md
Last active September 6, 2015 03:53
Router Hacked Documentation

My router has been hacked. Here's what I know:

I'm unaware of how my router became infected, but the password has definitely been changed. I admittedly had not done any firmware updates in quite some time, which could be related to the infection.

The router was setting a custom DNS for google-analytics.com, which pointed to their apparently malicious server. Unfortunately, I did not realize it was DNS manipulation before I reset my router (I thought google-analytics.com was an invalid domain), so I did not get the original IP address. It servers up the script that spearheads this whole thing. The source for that script at the time of writing can be found in the file google-analytics.js

Once google-analytics runs, it inserts an iFrame that directs to http://storage.com/storage.html. The ad serving script is clever in that it will only serve you ads so many times in a given period, so that you won't be able to debug and you might not really think anything is wrong. It stores timed cookies on the storage.com

@richardtape
richardtape / install-oh-my-zsh-on-ubuntu
Created August 4, 2014 01:58
Install Oh My ZSH on Ubuntu 14.04
# Where is the location of your current shall. Useful if we need to revert
echo $0
# Install ZSH
sudo apt-get install zsh
# Instal GIT
sudo apt-get install git-core
# Install OhMyZSH
# /etc/udev/rules.d/20-bt-auto-enable-a2dp.rules
# hxss
SUBSYSTEM=="bluetooth", ACTION=="add", RUN+="/home/replace-it/bt-auto-enable-a2dp.sh"
@devbyray
devbyray / elfproef.validation.js
Last active February 22, 2024 12:07
How to validate BSN, PGN & OWN in the Netherlands with TypeScript/JavaScript
function elfProefValidation(value, type) {
let returnValue = false;
if (!value || value?.length === 0) {
return true;
}
if (value === '00000000000' || value.length !== 9) {
return false;
}
const values = value.split('');
const firstCharacter = parseInt(values[0], 10);