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
type Whatever struct { | |
someField int | |
} | |
func (w Whatever) MarshalJSON() ([]byte, error) { | |
return json.Marshal(struct{ | |
SomeField int `json:"some_field"` | |
}{ | |
SomeField: w.someField, | |
}) |
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
# This didn't work. | |
Jonathan Porta@PORTAJ-GAMETOP C:\Users\Jonathan Porta | |
$ net stop wuauserv | |
The Windows Update service is stopping. | |
The Windows Update service was stopped successfully. | |
Jonathan Porta@PORTAJ-GAMETOP C:\Users\Jonathan Porta | |
$ rd /s /q C:\Windows\SoftwareDistribution | |
C:\Windows\SoftwareDistribution\Download\8F36B3~1\BITB8C4.tmp - The operation completed successfully. |
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
#!/bin/bash | |
set -e # bail on errors | |
# Make sure your shell history isn't saved | |
hsback=$HISTFILE | |
unset HISTFILE | |
echo "Enter you current PIN - leave blank if default:" | |
read oldpin |
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
Snippet from: http://stackoverflow.com/questions/10048173/why-is-it-bad-style-to-rescue-exception-e-in-ruby?lq=1 | |
Rescuing Exception will resuce all types of exceptions, including signals. | |
loop do | |
begin | |
sleep 1 | |
eval "djsakru3924r9eiuorwju3498 += 5u84fior8u8t4ruyf8ihiure" | |
rescue Exception | |
puts "I refuse to fail or be stopped!" |
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
# Example Travis config. See the entire example: https://github.com/JonathanPorta/ci-build | |
language: objective-c | |
osx_image: xcode61 | |
rvm: | |
- 2.1.2 | |
install: | |
- ./Scripts/install.sh | |
script: | |
- ./Scripts/build.sh |
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
#! /bin/sh | |
# Example install script for Unity3D project. See the entire example: https://github.com/JonathanPorta/ci-build | |
# This link changes from time to time. I haven't found a reliable hosted installer package for doing regular | |
# installs like this. You will probably need to grab a current link from: http://unity3d.com/get-unity/download/archive | |
echo 'Downloading from http://netstorage.unity3d.com/unity/3757309da7e7/MacEditorInstaller/Unity-5.2.2f1.pkg: ' | |
curl -o Unity.pkg http://netstorage.unity3d.com/unity/3757309da7e7/MacEditorInstaller/Unity-5.2.2f1.pkg | |
echo 'Installing Unity.pkg' |
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
#! /bin/sh | |
# Example build script for Unity3D project. See the entire example: https://github.com/JonathanPorta/ci-build | |
# Change this the name of your project. This will be the name of the final executables as well. | |
project="ci-build" | |
echo "Attempting to build $project for Windows" | |
/Applications/Unity/Unity.app/Contents/MacOS/Unity \ | |
-batchmode \ |
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
Great Example: https://github.com/dgibbs64/linuxgsm/blob/b8312d1160271e4a36a0edada3fa11ba9b5e2cdb/functions/fn_update_check#L109-L127 | |
Steamcmd: steamcmd.exe +login anonymous +app_info_print 258550 +quit | |
Some potentially helpful thingys: | |
https://github.com/Philipp15b/go-steamapi | |
https://github.com/Philipp15b/go-steam | |
https://steamdb.info/app/740/history/ | |
https://steamdb.info/api/GetRawDepots/?appid=740 |
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
[portaj@portaj-air steam]$ find ./install | |
./install | |
./install/exp_rust_linux | |
./install/exp_rust_linux/e8618f5c68cd68d6261d70d8be8661a18c11ebae | |
./install/exp_rust_linux/e8618f5c68cd68d6261d70d8be8661a18c11ebae/temp | |
./install/exp_rust_linux/e8618f5c68cd68d6261d70d8be8661a18c11ebae/appmanifest_258550.acf | |
./install/exp_rust_linux/e8618f5c68cd68d6261d70d8be8661a18c11ebae/downloading | |
./install/exp_rust_linux/EmptySteamDepot | |
./install/exp_rust_macos | |
./install/dev_rust_linux |
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
#!/bin/sh | |
# 2012 - Ben Clayton (benvium). Calvium Ltd | |
# Found at https://gist.github.com/2568707 | |
# | |
# This script installs a .mobileprovision file without using Xcode. Unlike Xcode, it'll | |
# work over SSH. | |
# | |
# Requires Mac OS X (I'm using 10.7 and Xcode 4.3.2) | |
# |