View motor_mix.lua
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
-- duplicate the #defines from AP_Motors | |
local AP_MOTORS_MOT_1 = 0 | |
local AP_MOTORS_MOT_2 = 1 | |
local AP_MOTORS_MOT_3 = 2 | |
local AP_MOTORS_MOT_4 = 3 | |
local function add_motor(motor_num, angle_degrees, yaw_factor, testing_order) | |
gcs:send_text(6, string.format("Adding motor:%i to MotorsMatrix", motor_num + 1)) |
View gist:1094320
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
- (void)setupSphere { | |
std::vector<vertexStruct> verticesVector; | |
std::vector<int> indicesVector; | |
double latitudeBands = 30; | |
double longitudeBands = 30; | |
double radius = 2; | |
for (double latNumber = 0; latNumber <= latitudeBands; latNumber++) { | |
double theta = latNumber * M_PI / latitudeBands; |
View gist:3030772
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
static GLKVector4 HslToRgb(float h, float s, float l, float a); | |
static GLKVector4 HslToRgb(float h, float s, float l, float a) { | |
float r = 0.0f, g = 0.0f, b = 0.0f; | |
float temp1, temp2; | |
if(l == 0.0f) | |
{ | |
r = g = b = 0.0f; | |
} | |
else |
View token_replace.sh
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 | |
perl - /var/www/html/wp-config.php <<'EOF' | |
use strict; | |
use warnings; | |
$^I = '.bak'; | |
my $keys = `curl -sS https://api.wordpress.org/secret-key/1.1/salt/`; | |
while(<>) { | |
if (/\{KEYS_TOKEN\}/){ |
View ServiceStackFormatter.cs
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
using System.Net.Http.Formatting; | |
using System.Net.Http.Headers; | |
using System.Text; | |
using System.Threading.Tasks; | |
using ServiceStack.Text; | |
namespace HttpClientTest.Formatters { | |
public class ServiceStackFormatter : MediaTypeFormatter { | |
public ServiceStackFormatter() { | |
// Fill out the mediatype and encoding we support |
View TransmitView.xaml
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
<UserControl x:Class="OsgExporter.Shell.Views.TransmitView" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
mc:Ignorable="d" Loaded="TransmitView_OnLoaded" | |
d:DesignHeight="312" d:DesignWidth="496"> | |
<Grid x:Name="LayoutRoot"> | |
<Grid Margin="8,0,0,0" Height="Auto" VerticalAlignment="Center"> | |
<Grid.RowDefinitions> |
View lsyncd.conf.lua
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
-- | |
-- lsyncd conf file | |
-- | |
settings { | |
delay = 1, | |
maxProcesses = 5, | |
logfile = "/var/log/lsyncd/lsyncd.log", | |
statusFile = "/var/log/lsyncd/lsyncd-status.log", | |
} |