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
dim shell, DQ, MSI_store, vbsinstall_folder, path_to_exe, options, chkfile | |
' Constants | |
DQ = chr(34) | |
Set FSys = CreateObject("Scripting.FileSystemObject") | |
vbsinstall_folder = "C:\vbs_install\" 'path to store keys in | |
if Not Fsys.FolderExists(vbsinstall_folder) Then | |
Fsys.CreateFolder(vbsinstall_folder) |
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
path = require 'path' | |
fs = require 'fs-plus' | |
temp = require 'temp' | |
describe 'Jekyll', -> | |
describe 'before Activation', -> | |
it 'should be in the packages list', -> | |
expect(atom.packages.loadedPackages["jekyll"]).toBeDefined() |
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
# Set the Location to my Powershell FOlders | |
set-location c:\Code\Powershell | |
# Fix/Set the console size | |
$Shell = $Host.UI.RawUI | |
$size = $Shell.WindowSize | |
$size.width=150 | |
$size.height=50 | |
$Shell.WindowSize = $size |
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
http_port 3128 | |
hierarchy_stoplist cgi-bin ? | |
cache_mem 1024 MB | |
cache_dir aufs /squid_cache/cache 81920 16 256 | |
maximum_object_size 5120 MB | |
cache_store_log /squid_cache/store.log | |
coredump_dir /var/spool/squid3 |
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
class Player | |
Directions = [:left, :right, :forward, :backward] | |
FullHealth = 20 | |
def full_health? | |
@warrior.health == FullHealth | |
end | |
def whats_out_there? |
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
def gravatar_url(email,options = {}) | |
require 'digest/md5' | |
hash = Digest::MD5.hexdigest(email) | |
url = "http://www.gravatar.com/avatar/#{hash}" | |
options.each do |option| | |
option == options.first ? url+="?" : url+="&" | |
key = option[0].to_s | |
value = option[1].to_s | |
url+=key + "=" + value | |
end |
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
[/\[gist\](.*?)\[\/gist\]/,'<script src="http://gist.github.com/\1.js"> </script>',:code_enabled], | |
[/\[gist=(.*?)\](.*?)\[\/gist\]/,'<script src="http://gist.github.com/\2.js?file=\1"> </script>',:code_enabled] |
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
def create | |
@post = Post.find(params[:post_id]) if params[:post_id] | |
@post = Post.find(params[:comment][:post_id]) if params[:comment][:post_id] | |
@comment = @post.comments.new(params[:comment]) | |
@comment.user_id = current_user.id if current_user | |
if @comment.body.spam? then | |
unless params[:recaptcha_challenge_field] then | |
flash[:error] = "Comment looks like Spam" | |
render :action => 'new' | |
else |
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
def up_handler(input) | |
input.upcase | |
end | |
>> "[up]HeLlo WorLd[/up]".tbbc(:custom_tags => [[/\[up\](.*?)\[\/up\]/,"Callback: up_handler",true]]) | |
=> "HELLO WORLD" |
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
def create | |
user = User.find_by_provider_and_uid("ldap",params[:username]) || User.create_with_omniauth("ldap",params[:username]) | |
session[:user_id] = user.id | |
redirect_to "/pages/splash" | |
end |
OlderNewer