Skip to content

Instantly share code, notes, and snippets.

View samundrak's full-sized avatar
👽
(function () { return 'Hello World' }) ()

Samundra Khatri samundrak

👽
(function () { return 'Hello World' }) ()
View GitHub Profile
@samundrak
samundrak / appUpload.php
Created July 31, 2013 12:15
trouble in multiple file upload
<?php
class AppUpload{
public $appName,$desc,$keyword,$price;
public $formName;
public function __construct(){
if(isset($_POST['submit'])){
$this->appName = $_POST['appName'];
$this->desc = $_POST['description'];
This file has been truncated, but you can view the full file.
/*! mig33_JS_Client - v2.7.0 - 2013-07-31
* Copyright (c) 2013 ; Licensed */
function pluralRuleParser(e,t){function n(){}function i(e){return function(){for(var t=0;e.length>t;t++){var n=e[t]();if(null!==n)return n}return null}}function o(e){for(var t=w,n=[],i=0;e.length>i;i++){var o=e[i]();if(null===o)return w=t,null;n.push(o)}return n}function a(e,t){return function(){for(var n=w,i=[],o=t();null!==o;)i.push(o),o=t();return e>i.length?(w=n,null):i}}function s(t){var n=t.length;return function(){var i=null;return e.substr(w,n)===t&&(i=t,w+=n),i}}function r(t){return function(){var n=e.substr(w).match(t);return null===n?null:(w+=n[0].length,n[0])}}function l(){var e=k();return null===e?(n(" -- failed n"),e):(e=parseFloat(t),n(" -- passed n ",e),e)}function c(){var e=o([l,b,E,b,x]);return null===e?(n(" -- failed mod"),null):(n(" -- passed mod"),parseInt(e[0],10)%parseInt(e[4],10))}function u(){var e=o([b,T]);return null===e?(n(" -- failed not"),null):e[1]}function h(){var e=o([M,b,C,a(0,u),b,x]);return null!=
This file has been truncated, but you can view the full file.
/*! mig33_JS_Client - v2.7.0 - 2013-07-31
* Copyright (c) 2013 ; Licensed */
function pluralRuleParser(e,t){function n(){}function i(e){return function(){for(var t=0;e.length>t;t++){var n=e[t]();if(null!==n)return n}return null}}function o(e){for(var t=w,n=[],i=0;e.length>i;i++){var o=e[i]();if(null===o)return w=t,null;n.push(o)}return n}function a(e,t){return function(){for(var n=w,i=[],o=t();null!==o;)i.push(o),o=t();return e>i.length?(w=n,null):i}}function s(t){var n=t.length;return function(){var i=null;return e.substr(w,n)===t&&(i=t,w+=n),i}}function r(t){return function(){var n=e.substr(w).match(t);return null===n?null:(w+=n[0].length,n[0])}}function l(){var e=k();return null===e?(n(" -- failed n"),e):(e=parseFloat(t),n(" -- passed n ",e),e)}function c(){var e=o([l,b,E,b,x]);return null===e?(n(" -- failed mod"),null):(n(" -- passed mod"),parseInt(e[0],10)%parseInt(e[4],10))}function u(){var e=o([b,T]);return null===e?(n(" -- failed not"),null):e[1]}function h(){var e=o([M,b,C,a(0,u),b,x]);return null!=
::selection{background-color:orange}a{text-decoration:none;color:#000;transition:color 2s}a:hover{color:#fff}
#sw_windowBox{display:none;position:fixed;top: 0;left: 0;width: 100%;height: 100%;background-color:#000;opacity:0.5;z-index: 9999;border-radius:10px;}#sw_widgetBox{z-index:9999;position:fixed;width:500px;height:500px;background-color:#F2F2F2;opacity:1;display:none;top:50px;left:400px;border-radius:50px 0 50px 0;box-shadow:0 0 40px #000;-moz-box-shadow:0 0 40px #000}#sw_widgetBox .head{cursor:pointer;width:500px;height:60px;background-color:#000;border-radius:50px 0 0 0;box-shadow:0 4px 10px #333;-moz-box-shadow:0 1px 7px #333;overflow:hidden}#sw_widgetBox .head .heading{color:#fff;text-align:center;font-size:35px;line-height:60px}#sw_widgetBox .content{width:500px;height:380px}#sw_widgetBox .sw_foot{width:500px;height:60px;background-color:#000;border-radius:0 0 50px 0}#sw_widgetBox .sw_foot ul{list-style-type:none}#sw_widgetBox .sw_foot li{display:inline;color:#fff;font-size:30px;width:40px;margin-le
<?php
$url = 'http://www.wordpress.com';
// $header [] = "Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
// $header [] = "Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3";
// $header [] = "Accept-Encoding:gzip,deflate";
// $header [] = "Accept-Language:en-US,en;q=0.5";
// $user_cookie = "cookies.txt";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
http://errors.angularjs.org/1.2.28/$injector/unpr?p0=vDiscoverAdminProvider%20%3C-%20vDiscoverAdmin%20%3C-<body ui-view="" class="ng-scope">tudentProfile
//module is loaded first
script(src='/javascripts/angular-module/student/student.js' type='text/javascript')
//and then service
script(src='/javascripts/angular-module/student/student_service.js' type='text/javascript')
@samundrak
samundrak / index.php
Created October 10, 2015 20:03
Pulling SLC Result From Slc.ntc.net.np From PHP Nepali,I am trying to pull slc result from slc.ntc.net.np website from php CURL .First it make request to website and send the form data symbol number to website and we save the result as text in our server and then we show the result.
<form action="" method="post">
<input type="text" name="symbol">
<input type="submit" name="submit">
</form>
<?php
$scrapper = new scrapper();
echo $scrapper->show();
class scrapper{
private $symbol;
//By object Create
//We can make some props non enumerable
//We can make some props non writable and non configurable
var cat = Object.create(Object.prototype,{
name : {
value :'samundra',
enumerable : true,
writable : true,
configurable: true
},
@samundrak
samundrak / node-folder-structure-options.md
Created July 7, 2016 18:47 — forked from lancejpollard/node-folder-structure-options.md
What is your folder-structure preference for a large-scale Node.js project?

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin
#!/usr/bin/python
import socket, random, sys, time, os, platform, base64
""" Script is for DOS - USE WISELY """
"""
def __init__(self, parent, reactor, watcher, socketType):
QObject.__init__(self, parent)
self.reactor = reactor