Skip to content

Instantly share code, notes, and snippets.

View benlights's full-sized avatar

Mendel Schneerson benlights

View GitHub Profile
@benlights
benlights / google-dorks
Created August 1, 2018 15:13 — forked from stevenswafford/google-dorks
Listing of a number of useful Google dorks.
" _ _ "
" _ /|| . . ||\ _ "
" ( } \||D ' ' ' C||/ { % "
" | /\__,=_[_] ' . . ' [_]_=,__/\ |"
" |_\_ |----| |----| _/_|"
" | |/ | | | | \| |"
" | /_ | | | | _\ |"
It is all fun and games until someone gets hacked!
@benlights
benlights / csv_to_array.php
Created February 23, 2018 17:46 — forked from jaywilliams/csv_to_array.php
Convert a comma separated file into an associated array.
<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Example:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array
@benlights
benlights / test_php_skill.php
Created February 23, 2018 17:45 — forked from jaywilliams/test_php_skill.php
Test PHP Skill
<?php
/*****************************************
* Created this test for job interviews. *
*****************************************/
/**
* Directions
*
* Read the direction in the Q and respond below A.
@benlights
benlights / convert_ascii.php
Created February 23, 2018 17:44 — forked from jaywilliams/convert_ascii.php
This simple function will remove any non-ASCII character. Feel free to fork and extend!
<?php
/**
* Remove any non-ASCII characters and convert known non-ASCII characters
* to their ASCII equivalents, if possible.
*
* @param string $string
* @return string $string
* @author Jay Williams <myd3.com>
* @license MIT License
* @link http://gist.github.com/119517
@benlights
benlights / rails_switch_branch.py
Created June 30, 2016 17:01 — forked from skyriverbend/rails_switch_branch.py
Rails: Switch branches and run migrations
#!/usr/local/bin/python
"""
To use this script, you must be in the root directory of a Rails project that
is using git. You should also make sure that your directory does not contain any
uncommitted changes. Then run:
$ python rails_switch_branch.py name_of_another_branch
Running the above will do the following:
@benlights
benlights / weather.sh
Last active August 29, 2015 14:19 — forked from lubosz/weather.sh
#!/bin/sh
DOWNLOAD_DIR=~/Downloads/weather
REGION=txgulf
# make download dir if not available
if [ ! -d "$DOWNLOAD_DIR" ]; then
mkdir -p $DOWNLOAD_DIR
fi