View lsyncd.conf.lua
-- | |
-- lsyncd conf file | |
-- | |
settings { | |
delay = 1, | |
maxProcesses = 5, | |
logfile = "/var/log/lsyncd/lsyncd.log", | |
statusFile = "/var/log/lsyncd/lsyncd-status.log", | |
} |
View gist:3030772
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
#!/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
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 gist:1094320
- (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 TransmitView.xaml
<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> |