Another curated list like awesome-go.
Not complete. Not authoritative. Not cupcake.
Send suggestions: @squarism :)
☆ = Github stars (in November 2016)
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
To add a simulator | |
Choose Hardware > Device > Manage Devices. | |
Xcode opens the Devices window. | |
At the bottom of the left column, click the Add button (+). | |
In the dialog that appears, enter a name in the Simulator Name text field and choose the device from the Device Type pop-up menu. | |
//by default |
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
# The trick is to link the DeviceSupport folder from the beta to the stable version. | |
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
# (A similar approach works for older versions too, just change the version number after DeviceSupport) |
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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"os/exec" | |
"time" | |
) | |
func run(timeout int, command string, args ...string) 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
# Docker aliases | |
alias di='sudo docker images' | |
alias dps='sudo docker ps -a' | |
# useful Docker functions | |
dock-run() { sudo docker run -i -t --privileged $@ ;} | |
dock-exec() { sudo docker exec -i -t $@ /bin/bash ;} | |
dock-log() { sudo docker logs --tail=all -f $@ ;} | |
dock-port() { sudo docker port $@ ;} | |
dock-vol() { sudo docker inspect --format '{{ .Volumes }}' $@ ;} |
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
<?php | |
/** | |
* Draw a rectangle with rounded corners. | |
* @param ressource &$img An image resource | |
* @param int $x1 Upper left x coordinate | |
* @param int $y1 Upper left y coordinate | |
* @param int $x2 Bottom right x coordinate | |
* @param int $y2 Bottom right y coordinate | |
* @param int $r Corners radius | |
* @param int $color A color identifier created with imagecolorallocate() |
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
package timestamp | |
import ( | |
"fmt" | |
"labix.org/v2/mgo/bson" | |
"strconv" | |
"time" | |
) | |
type Timestamp time.Time |
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
// | |
// AMScanViewController.h | |
// | |
// | |
// Created by Alexander Mack on 11.10.13. | |
// Copyright (c) 2013 ama-dev.com. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
#import <AVFoundation/AVFoundation.h> |
Similar to ansible
command but allows you to use any command that will work in your shell. Not tied to specific configuration management tooling, just SSH and your default shell on remote systems. Just works. I <3 it :)
Runs commands across potentially many machines. Allows you to organize your servers/VMs/instances into groups very easily.
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
//Two Different methods of calculating Modbus's CRC16 | |
//You can use http://www.lammertbies.nl/comm/info/crc-calculation.html to verify the calculation. Change Input Mode to Hex and input the string "0103" This is for Modbus CRC's. | |
imp.configure ("CRC Calculation", [], []); | |
server.log("============ PROGRAM START =============") | |
/******************************************************************************* | |
HELPER FUNCTIONS | |
*******************************************************************************/ | |
function byteArrayString(arr){ | |
local str = "" |
NewerOlder