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
// From https://steamcommunity.com/app/358720/discussions/0/343787283754448603/?ctp=2#c1326718197205185044 | |
bool BIsHTCViveController() | |
{ | |
System.Text.StringBuilder sbType = new System.Text.StringBuilder(1000); | |
Valve.VR.ETrackedPropertyError err = Valve.VR.ETrackedPropertyError.TrackedProp_Success; | |
SteamVR.instance.hmd.GetStringTrackedDeviceProperty((uint)trackedObj.index, Valve.VR.ETrackedDeviceProperty.Prop_ManufacturerName_String, sbType, 1000, ref err); | |
return ( err == Valve.VR.ETrackedPropertyError.TrackedProp_Success && sbType.ToString().StartsWith("HTC") ); | |
} |
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
scp -rv <user>@<remote_host>:<remote_source_path>* <local_target_path> |
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
#!/bin/sh | |
#################################################### | |
## ## | |
## PPP VPN split-network/split-DNS script for OSX ## | |
## by Aaron Meriwether ## | |
## ## | |
## installation: ## | |
## sudo cp thisfile /etc/ppp/ip-up ## | |
## sudo chmod 755 /etc/ppp/ip-up ## | |
## ## |
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
#!/bin/bash | |
# Kill any running Xcode or CoreSimulator processes | |
killall Xcode | |
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService | |
# Remove existing simulators, including any installed apps | |
rm -rf ~/Library/Developer/CoreSimulator/Devices | |
# Recreate available devices and simulators to correspond to iOS runtime bundled with installed Xcode version and any additionally-installed runtimes | |
open /Applications/Xcode.app | |
# List available devices (in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/CoreSimulator/Profiles |
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
#!/bin/bash | |
# Uninstall node.js | |
# | |
# Options: | |
# | |
# -d Actually delete files, otherwise the script just _prints_ a command to delete. | |
# -p Installation prefix. Default /usr/local | |
# -f BOM file. Default /var/db/receipts/org.nodejs.pkg.bom |
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 | |
/** | |
* Create ACF setting page under Events CPT menu | |
* | |
* @since 1.0.0 | |
*/ | |
if ( function_exists( 'acf_add_options_sub_page' ) ){ | |
acf_add_options_sub_page(array( | |
'title' => 'Event Settings', | |
'parent' => 'edit.php?post_type=events', |
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
DB="your_database_name" | |
USER="your_db_user" | |
PASS="your_db_pass" | |
HOST="database_hostname" | |
( | |
echo 'ALTER DATABASE `'"$DB"'` CHARACTER SET utf8 COLLATE utf8_general_ci;' | |
mysql -p $PASS -u $USER -h $HOST "$DB" -e "SHOW TABLES" --batch --skip-column-names \ | |
| xargs -I{} echo 'ALTER TABLE `'{}'` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;' | |
) \ | |
| mysql -p $PASS -u $USER -h $HOST "$DB" |
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
sudo chown -R `whoami` /usr/local/lib/node_modules |
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
git rm -r --cached . | |
git add . | |
git commit -m 'Removed all files that are in the .gitignore' |
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
$ wget --mirror --no-parent --adjust-extension --restrict-file-names=windows --convert-links --page-requisites --verbose --directory-prefix=/home/user/path http://www.example.com/ |
NewerOlder