Skip to content

Instantly share code, notes, and snippets.

Avatar
😍
Building Crap

Shobi ppshobi

😍
Building Crap
View GitHub Profile
View banana_api.md

Case A

path: /banana

method: post

payload:

{
@ppshobi
ppshobi / CircularIterator.php
Created Feb 20, 2019
CircularIterator - An InfininIteIterator for PHP
View CircularIterator.php
<?php
use Iterator;
class CircularIterator implements Iterator
{
private $entries;
public function __construct($entries)
{
@ppshobi
ppshobi / Configuring Celery And SQS with Pycurl Problem in MacOS, Ubuntu.md
Last active Aug 28, 2018
Configuring Celery And SQS with Pycurl Problem in MacOS, Ubuntu
View Configuring Celery And SQS with Pycurl Problem in MacOS, Ubuntu.md

Fix Pycurl Installation issues In Mac and Linux

Celery uses a package called kombu, which requires the pycurl library to communicate with sqs, but installing pycurl has never come easy to me. even though sometimes it gets installed through pip, when I start celery it was saying pycurl library is required. the problem lies with the ssl library requirement of pycurl Here is a set of commands which worked for me

Mac Os (High Sierra)

brew install curl --with-openssl

View Email Segmentation - Python Script .py
#!/usr/bin/env python3
import csv
import sys
import re
#######################
## Configurations ##
#######################
@ppshobi
ppshobi / array_walk_recursive.php
Created Sep 21, 2017
array_walk_recursive - Example
View array_walk_recursive.php
<?php
$array = [
'a' => [
'z' => 'abcs ',
'y' => ' xzsy ',
'x' => 'abc xyz',
'w' => [
'elem1' => ' gasd fsdf ',
'elem2' => 'ash fhakjs d '
View launch.json - vcode xdebug
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"serverSourceRoot": "/home/vagrant/Code",
"localSourceRoot": "${workspaceRoot}",
View Laravel Cheat Sheet
Artisan
// Displays help for a given command
php artisan --help OR -h
// Do not output any message
php artisan --quiet OR -q
// Display this application version
php artisan --version OR -V
// Do not ask any interactive question
php artisan --no-interaction OR -n
// Force ANSI output
@ppshobi
ppshobi / AESCipher.py
Created Apr 13, 2017 — forked from chrcoe/AESCipher.py
PyCrypto AES using ECB mode implementation in Python 3.3. This uses very basic 0x00 padding, I would recommend PKCS5/7
View AESCipher.py
'''
Created on Mar 20, 2014, uses PyCrypto/Python 3.3
@author: Chris Coe
'''
import binascii
from Crypto.Cipher import AES
class AESCipher:
'''
View hax tor hu level 14
remove space, split by 32 bit length strings, (ie:md5 hashes have 32 bit length) try decoding using any online md5 decoder
View Hax.tor.hu-level 11 - find the hash within time
//try pasting this in the js console in the level 11 hax.tor.hu challenge
/*
CryptoJS v3.1.2
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
var CryptoJS=CryptoJS||function(s,p){var m={},l=m.lib={},n=function(){},r=l.Base={extend:function(b){n.prototype=this;var h=new n;b&&h.mixIn(b);h.hasOwnProperty("init")||(h.init=function(){h.$super.init.apply(this,arguments)});h.init.prototype=h;h.$super=this;return h},create:function(){var b=this.extend();b.init.apply(b,arguments);return b},init:function(){},mixIn:function(b){for(var h in b)b.hasOwnProperty(h)&&(this[h]=b[h]);b.hasOwnProperty("toString")&&(this.toString=b.toString)},clone:function(){return this.init.prototype.extend(this)}},
q=l.WordArray=r.extend({init:function(b,h){b=this.words=b||[];this.sigBytes=h!=p?h:4*b.length},toString:function(b){return(b||t).stringify(this)},concat:function(b){var h=this.words,a=b.words,j=this.sigBytes;b=b.sigBytes;this.clamp();if(j%4)for(var g=0;g<b;g++