Skip to content

Instantly share code, notes, and snippets.

View ecoreng's full-sized avatar

Ecor ecoreng

  • The Californias
View GitHub Profile
@ecoreng
ecoreng / part1.ini
Last active May 21, 2023 23:14
sample
[variable]
name='speed'
value=''+[DataCorePlugin.TurboLevel]+'%'
[variable]
name='currentGear'
value=[DataCorePlugin.GameData.NewData.Gear]
[variable]
name='label'
import React, { useState, useEffect } from 'react'
import Layout from '../components/layout'
import withAuth from '../util/withAuth';
import { Routes, Roles } from '../constants';
import Sidebar from '../components/sidebar';
import noop from 'lodash/noop';
import { authHeader } from '../api/common';
import deepmerge from 'deepmerge';
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only';
#!/usr/bin/env bash
# Wayback machine downloader
#TODO: Remove redundancy (download only newest files in given time period - not all of them and then write over them)
############################
clear
#Enter domain without http:// and www.
domain="google.com"
#Set matchType to "prefix" if you have multiple subdomains, or "exact" if you want only one page
matchType="domain"
@ecoreng
ecoreng / hosts_editor.php
Last active August 29, 2015 14:14
/etc/hosts php command
#!/usr/bin/php
<?php
namespace ecoreng;
class HostsEditor
{
// linux [run as root]
protected $hosts = '/etc/hosts';
@ecoreng
ecoreng / gist:10160853
Created April 8, 2014 17:37
Credit card identification
function CreditCardCompany($ccNum)
{
/*
* mastercard: Must have a prefix of 51 to 55, and must be 16 digits in length.
* Visa: Must have a prefix of 4, and must be either 13 or 16 digits in length.
* American Express: Must have a prefix of 34 or 37, and must be 15 digits in length.
* Diners Club: Must have a prefix of 300 to 305, 36, or 38, and must be 14 digits in length.
* Discover: Must have a prefix of 6011, and must be 16 digits in length.
* JCB: Must have a prefix of 3, 1800, or 2131, and must be either 15 or 16 digits in length.
*/
@ecoreng
ecoreng / gist:7901911
Last active December 30, 2015 23:39
If visitor is my ip, then enable error reporting, and do other stuff
<?php
if ($_SERVER['REMOTE_ADDR'] == 'My.IP.address.!') {
error_reporting(E_ALL);
ini_set("display_errors", 1);
// do stuff
}
?>