Skip to content

Instantly share code, notes, and snippets.

@scriptnull
scriptnull / timer.html
Created February 21, 2014 16:11
My approach of writing a js timer !
<html>
<head>
<title>Timer</title>
<script type="text/javascript">
function onloadME (timer) {
window.setInterval(timerfunc,1000);
}
sec = 0 ;
min = 0;
@scriptnull
scriptnull / Endless-Naruto-Download-script.js
Created April 14, 2014 14:13
No need to wait 2 mins for every download in endless-naruto.com . Open the download page , hit F12 , goto Console , copy paste the script in prompt .Find the attribute value="Naruto/Naruto Episode 88 [Endless-Naruto.com].zip" in the code and change the episode number you want to download . press enter :) Enjoy :)
document.getElementById('download_texts').innerHTML = 'Your download is ready! Click the button below to start your download.';
document.getElementById('download_input').innerHTML = '<form name="downloadForm" id="downloadForm" method="post"><input type="hidden" name="www_form_submit" value="1" /><input style="color:#111111;font-family:verdana;font-size:11px;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;" type="submit" name"submit" id="submitDownload" onclick="disableDownload()" value="Download" /><input type="hidden" name="id" value="Naruto/Naruto Episode 88 [Endless-Naruto.com].zip" /> <span style="display: none;" id="enjoy"><em>Enjoy!</em></span></form>';
document.downloadForm.submit();
@scriptnull
scriptnull / Win8Layout.xaml
Created June 13, 2014 14:27
Layout, XAML , Grid , Stack Panel
<Page
x:Class="App4.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App4"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid x:Name="layoutGrid" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
@scriptnull
scriptnull / BundleConfig.cs
Last active August 29, 2015 14:03
ASP .NET MVC + BootStrap Basic installation
using System.Web;
using System.Web.Optimization;
namespace MvcBootStrapTry
{
public class BundleConfig
{
// For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
public static void RegisterBundles(BundleCollection bundles)
{
@scriptnull
scriptnull / variableEquator.js
Created June 20, 2015 02:24
This is a snippet that supplements scriptnull.github.io/foreachline. Usage: a = b; will be converted to b = a;
var variables = line.replace(';','').split('=');
line = variables[1] + ' = ' + variables[0] + ';' ;
@scriptnull
scriptnull / bootStrapTable.js
Created June 28, 2015 05:25
This is a snippet that supplements scriptnull.github.io/foreachline. Usage: variable = value ; will be converted to a Bootstrap Table JS Object. ( http://bootstrap-table.wenzhixin.net.cn/ )
var variableName = line.split('=')[0].trim();
line =JSON.stringify({ field: variableName , title: variableName, align: 'center', valign: 'bottom', sortable: true, visible: true }) + ',' ;
@scriptnull
scriptnull / CallBroadCastReceiverCheatSheet.java
Created July 14, 2015 18:57
Easily handle calling events in Android by making use of this cheatsheet
//outgoing
//07-14 23:57:20.874 9111-9111/tb360.com.healthhub D/MessageUploaderApp﹕ BR PhoneNumber nullState OFFHOOK
//07-14 23:57:25.544 9111-9111/tb360.com.healthhub D/MessageUploaderApp﹕ BR PhoneNumber nullState IDLE
//incoming , not attended , cut by receiver or dialer
//07-15 00:22:32.924 9111-9111/tb360.com.healthhub D/MessageUploaderApp﹕ BR PhoneNumber +919535915747State RINGING
//07-15 00:22:34.954 9111-9111/tb360.com.healthhub D/MessageUploaderApp﹕ BR PhoneNumber +919535915747State IDLE
//incoming , attended ,cut by receiver or dialer
//07-15 00:27:28.524 9111-9111/tb360.com.healthhub D/MessageUploaderApp﹕ BR PhoneNumber +919535915747State RINGING
@scriptnull
scriptnull / EntityModelPropsExtractor.js
Last active August 29, 2015 14:26
This is a snippet that supplements http://scriptnull.github.io/foreachline/#/ . usage: public int apple ; or public int apple { get; set;} ; gets converted into oldObject.apple = newObject.apple;
if(line.indexOf('[') > 0 || line == ''){
line = "";
}else{
line = line.trimLeft().split(' ')[2];
line = "oldBook." + line + " = " + "book." + line;
}
@scriptnull
scriptnull / ListTheFiles.java
Created October 26, 2013 19:18
java snippet to list all the file names available in a folder path
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
File folder = new File("C:/"); //folder path
File[] myf = folder.listFiles();
@scriptnull
scriptnull / basic.tcl
Created November 10, 2013 17:58
Basics of TCL scripting. UDP agent is used as example. check http://csis.bits-pilani.ac.in/faculty/murali/resources/tutorials/ns2.htm
#create ns
set ns [ new Simulator ]
#output file
set outputfile [ open out.nam w ]
$ns namtrace-all $outputfile
#trace file
set tracefile [ open out.tr w ]
$ns trace-all $tracefile