This file contains hidden or 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
<?hh | |
function get_app_to_handle_uri(string $uri): { | |
switch ($uri->getProtocol()) { | |
case 'itunes': | |
return ITUNES_APP; | |
case 'irc': | |
return IRC_APP; | |
case 'https': | |
if ($uri->getAuthority()->endsWith('.onion')) { |
This file contains hidden or 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 UserService | |
def self.register(params) | |
user = User.new | |
user.first_name = params[:first_name] | |
user.last_name = params[:last_name] | |
user.email = params[:email] | |
user.password = params[:password] | |
user.password_confirmation = params[:password_confirmation] | |
user.save |
This file contains hidden or 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
Process: id-updater [10658] | |
Path: /Library/EstonianIDCard/*/id-updater.app/Contents/MacOS/id-updater | |
Identifier: id-updater | |
Version: 3.6.0.574 (3.6.0.574) | |
Code Type: X86-64 (Native) | |
Parent Process: launchd [120] | |
User ID: 501 | |
Date/Time: 2013-03-04 12:27:42.012 +0200 | |
OS Version: Mac OS X 10.8.2 (12C60) |
This file contains hidden or 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
import Image | |
import random | |
TERRAIN_GRASS = 0 | |
TERRAIN_SAND = 1 | |
TERRAIN_WATER = 2 | |
TERRAIN_DIRT = 3 | |
COLORS = [ | |
(0x52, 0x65, 0x35, 0x00), |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>ee.perfectline.httpredirect</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>sh</string> | |
<string>-c</string> |
This file contains hidden or 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
#!/usr/bin/env ruby | |
PATH_SRC = "/usr/local/bin" | |
PATH_DST = "/usr/bin" | |
%w[animate compare composite conjure convert display identify import mogrify montage stream].each do |file| | |
if File.exists?("#{PATH_DST}/#{file}") | |
puts "[EXIST]: #{file}" | |
else |
This file contains hidden or 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
#!/usr/bin/env ruby | |
def halt | |
puts "----------------------------------" | |
puts " Usage " | |
puts "----------------------------------" | |
puts "./shm.rb <size> <units>" | |
puts "\tsize = integer > 0" | |
puts "\tunits = MB or GB" | |
exit |
This file contains hidden or 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
#!/usr/bin/ruby -rubygems | |
require 'uri' | |
require 'curb' | |
if ARGV.size == 0 | |
puts "Usage: ytget <video>" | |
exit 0 | |
end |
This file contains hidden or 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
--- a/src/video/quartz/SDL_QuartzVideo.m Thu Feb 17 02:31:50 2011 -0800 | |
+++ b/src/video/quartz/SDL_QuartzVideo.m Tue Feb 22 22:21:26 2011 +0200 | |
@@ -761,7 +761,7 @@ | |
[ qz_window setFrameTopLeftPoint:NSMakePoint((float) origin_x, (float) (this->info.current_h - origin_y))]; | |
center_window = 0; | |
} else if ( center_window ) { | |
- [ qz_window center ]; | |
+ [ qz_window setFrameTopLeftPoint:NSMakePoint((float) 0, (float) [[qz_window screen] frame].size.height)]; | |
} | |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <dirent.h> | |
#define PVSZ_HOME "Library/Application Support/PopCap/PlantsVsZombiesMac/userdata" | |
char pvsz_home[999]; | |
void add_moneyz(char *file) |
NewerOlder