Skip to content

Instantly share code, notes, and snippets.

View rohitcoder's full-sized avatar
Focusing

Rohit Kumar rohitcoder

Focusing
View GitHub Profile
@bsalim
bsalim / php speed up tips.html
Created January 3, 2013 09:09
63 Tips for speeding up PHP
<html>
<body>
<p>Here are Webber’s points:</p>
<ul>
<li>If a method can be static, declare it static. Speed improvement is by a factor of 4.</li>
<li>echo is faster than print.(<em>* compare with list from phplens by John Lim</em>)</li>
<li>Use echo’s multiple parameters instead of string concatenation.</li>
<li>Set the maxvalue for your for-loops before and not in the loop.</li>
<li>Unset your variables to free memory, especially large arrays.</li>
<li>Avoid magic like __get, __set, __autoload</li>
@vladaman
vladaman / amazon-kinesis.php
Created April 8, 2014 17:28
PHP Code to request Temporary Amazon AMI Credentials and publish message dummy message to Kinesis Service
<?php
require 'aws-autoloader.php';
use Aws\Sts\StsClient;
use Aws\Kinesis\KinesisClient;
// In real applications, the following code is part of your trusted code.
// It has your security credentials that you use to obtain temporary
// security credentials.
$sts = StsClient::factory(array(
'key' => 'ACCESS-KEY-HERE',
@stetic
stetic / google-cloud-storage-upload-download.php
Last active September 25, 2023 19:20
PHP Example for Google Storage Upload and Download with Google APIs Client Library for PHP
<?php
/*
* PHP Example for Google Storage Up- and Download
* with Google APIs Client Library for PHP:
* https://github.com/google/google-api-php-client
*/
include( "Google/Client.php" );
include( "Google/Service/Storage.php" );
@haccer
haccer / scanio.sh
Last active July 20, 2024 09:50
PoC script to mass-locate vulnerable subdomains using results from Rapid7's Project Sonar
#!/bin/bash
# Usage : ./scanio.sh <save file>
# Example: ./scanio.sh cname_list.txt
# Premium
function ech() {
spinner=( "|" "/" "-" "\\" )
while true; do
for i in ${spinner[@]}; do
echo -ne "\r[$i] $1"