Skip to content

Instantly share code, notes, and snippets.

View pokurivijay's full-sized avatar
🎯
Focusing

Vijay Pokuri pokurivijay

🎯
Focusing
View GitHub Profile
@hofmannsven
hofmannsven / README.md
Last active September 17, 2023 20:18
PHP and Xdebug (Notes on OS X, VVV and MAMP)
@msurguy
msurguy / List.md
Last active April 30, 2024 15:14
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@levicook
levicook / gist:4132037
Created November 22, 2012 16:37
modeling friends and calculating mutual friends w/ mongodb
// ------------------------------------------------------------------
// Friend collection, where _id is a user.Id and Friends is a list, of user.Id.
// Note: friending and unfriending is a two step operation in this scheme:
> db.friends.find()
{ "_id" : 1, "friends" : [ 2, 3, 4 ] }
{ "_id" : 2, "friends" : [ 1, 3, 5 ] }
{ "_id" : 3, "friends" : [ 1, 2, 4, 5 ] }
{ "_id" : 4, "friends" : [ 1, 3, 5 ] }
{ "_id" : 5, "friends" : [ 2, 3, 4 ] }
@shunchu
shunchu / video-thumbnails-generator.sh
Created November 15, 2012 18:00
Batch generate thumbnails from mp4 files using ffmpg
#!/bin/bash
# setup
FILES=name_of_file_to_match_*.mp4
SEEK_POINT=00:00:30
IMG_FORMAT=png
FRAME_SIZE=150X100
DEST=thumbnails
for f in $FILES
@SiriusDely
SiriusDely / push_apns.php
Created May 2, 2012 00:23
Push Notification PHP Script - Apple iOS, Android C2DM, BlackBerry PPG
<?php
// Put your device token here (without spaces):
$deviceToken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// Put your private key's passphrase here:
$passphrase = 'xxxxxxx';
// Put your alert message here:
$message = 'A push notification has been sent!';
@dhoerl
dhoerl / KeychainItemWrapper.h
Last active April 4, 2023 08:15
KeychainItemWrapper ARCified. Added the ability to manage a dictionary in place of just a string - the #define PASSWORD_USES_DATA in the .m file switches the mode.
/*
File: KeychainItemWrapper.h
Abstract:
Objective-C wrapper for accessing a single keychain item.
Version: 1.2 - ARCified
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of
@Daniel15
Daniel15 / 1_Twitter autoresponder bot.md
Last active December 6, 2021 20:37
Twitter autoresponder bot

Twitter autoresponder bot

By Daniel15 (dan.cx) This is a very simple Twitter autoresponder bot. It requires PECL OAuth extension to be installed (run "pecl install oauth", or if on Windows, grab php-oauth.dll. If using cPanel you can install it via WHM). The authentication is designed for command-line usage, it won't work too well via a web browser. You'll have to sign up for an application on Twitter's site to get the consumer key and secret.

Could be modified to be more advanced (match regular expressions to answer questions, etc.)

Questions? See my blog post - http://dan.cx/blog/2011/06/twitter-autoreply-bot-dbznappa

Modified 2013-06-13 - Twitter API 1.0 discontinued, modified to use Twitter API 1.1

@samvermette
samvermette / apn-server.php
Created December 30, 2010 07:40
Quickly send an Apple Push Notification using PHP
<?php
$apnsHost = 'gateway.sandbox.push.apple.com';
$apnsCert = 'apns-dev.pem';
$apnsPort = 2195;
$streamContext = stream_context_create();
stream_context_set_option($streamContext, 'ssl', 'local_cert', $apnsCert);
$apns = stream_socket_client('ssl://' . $apnsHost . ':' . $apnsPort, $error, $errorString, 2, STREAM_CLIENT_CONNECT, $streamContext);