Skip to content

Instantly share code, notes, and snippets.

View YugalXD's full-sized avatar
💭
yugalxd@github:~$ profile

Yugal Yadav YugalXD

💭
yugalxd@github:~$ profile
View GitHub Profile
@dduan
dduan / gist:2708979
Created May 16, 2012 09:15
Convert web pages to PDF using Python + QtWebkit
# Authored by [email protected] as found in the following link:
# http://www.mail-archive.com/[email protected]/msg18928.html
import sys
from PyQt4 import QtCore
from PyQt4 import QtGui
from PyQt4.QtCore import QObject
from PyQt4.QtCore import QUrl
from PyQt4.QtCore import QSizeF
@prime31
prime31 / gist:5675017
Last active September 9, 2024 04:24
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
@leommoore
leommoore / mongodb_setting_up_a_replica_set.md
Last active December 8, 2021 09:58
MongoDB - Setting up a Replica Set

#MongoDB - Setting up a Replica Set

cd \mongodbdir\

mkdir db1
mkdir db2
mkdir db3

###Primary mongod --dbpath ./db1 --port 30000 --replSet "demo"