Skip to content

Instantly share code, notes, and snippets.

View alshell7's full-sized avatar

Owais alshell7

View GitHub Profile
@alshell7
alshell7 / gist:e7d7cce401d4d633c8a23d73e4a19a35
Last active March 25, 2017 20:39
Tweaking Windows Form in VB.Net
'Here Changing the msg value, tweaks out the window state and style. This is awesome !!
Protected Overrides Sub WndProc(ByRef m As Message)
If (m.Msg = 132) Then
m.Result = CType(2, IntPtr)
' Disable this sub for NoMoving Window
Return
End If
MyBase.WndProc(m)
@alshell7
alshell7 / dictionary.txt
Last active March 25, 2017 20:34
Dictionary words collection
A
a
aa
aal
aalii
aam
aardvark
aardwolf
Aaron
Aaronic
@alshell7
alshell7 / Fade Effect.snippet
Last active March 25, 2017 20:28
Visual Studio (VB.Net) snippets
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Fade In and Out Effect</Title>
<Author>Alshell7</Author>
<Description>Does Fade In and Fade Out Effect, during form load and closing respectively.</Description>
<Shortcut>FormFadeEffect</Shortcut>
</Header>
@alshell7
alshell7 / FFT.java
Last active February 11, 2017 01:23
Edited FFT for android.
/*
* Copyright (c) 2007 - 2008 by Damien Di Fede <ddf@compartmental.net>
*
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free
@alshell7
alshell7 / tornado_fb_poster.py
Created January 17, 2017 05:36 — forked from abdelouahabb/tornado_fb_poster.py
this is how to post on your application page on facebook using only Tornado, no more libraries ;)
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import tornado.auth
import tornado.escape
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web
import tornado.gen
@alshell7
alshell7 / MainMod.py
Last active December 10, 2023 14:48
Convert given string to SHA1 hash by hexadecimal digest in python
def sha1Hash(toHash):
try:
messageDigest = hashlib.sha1()
stringM = str(toHash)
byteM = bytes(stringM, encoding='utf')
messageDigest.update(byteM)
return messageDigest.hexdigest()
except TypeError:
raise "String to hash was not compatible"
@alshell7
alshell7 / tts_save_audio.vb
Created July 10, 2016 16:38
Convert text to speech with having the output be saved in specified location in *.wav format file.
Imports System.Speech.Synthesis
Public Class Form1
Dim spsynth As New Speech.Synthesis.SpeechSynthesizer
Private Sub SaveTTStoFile(ByVal TextToSpeak As String,ByVal FileLocation As String )
Try
With spsynth
.Volume = 100
.SetOutputToDefaultAudioDevice()
@alshell7
alshell7 / async_task.md
Last active June 17, 2016 19:46
Androids AsyncTask Explanation

##Basically AsyncTask uses generic types in its parameters The three types used by an asynchronous task are the following:

  • Params, the type of the parameters sent to the task upon execution.
  • Progress, the type of the progress units published during the background computation.
  • Result, the type of the result of the background computation.

Not all types are always used by an asynchronous task. To mark a type as unused, simply use the type Void: private class MyTask extends AsyncTask<Void, Void, Void> { ... }

##Taking a very known and common example..

@alshell7
alshell7 / commands.txt
Last active June 17, 2016 07:35
Collecting system information
#to display RSop of the system
gpresult /R
#to get various discrete info (DAMN important)
wmic class %wmi enumerated classname%
#on command line
systeminfo
#on interface
@alshell7
alshell7 / dot_net_dudes.txt
Last active June 17, 2016 07:18
List of best .NET and VB tutor links
http://www.developerfusion.com/
http://www.dreamincode.net
http://www.aboutmydot.net/
http://www.ultimateprogrammingtutorials.info/
http://www.techusers.net/
http://stackoverflow.com/
http://www.dotnetperls.com/
http://www.bigresource.com/
http://www.techotopia.com/
http://www.xtremevbtalk.com/