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 | |
while read oldrev newrev ref | |
do | |
if [[ $ref =~ .*/master$ ]]; | |
then | |
echo "Master ref received. Deploying master branch to production..." | |
git --work-tree=/home/deploy/server --git-dir=/home/deploy/server-bare checkout -f | |
else | |
echo "Ref $ref successfully received. Doing nothing: only the master branch may be deployed on this server." | |
fi |
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
package util | |
import io.opentracing.util.GlobalTracer | |
import datadog.trace.api.DDTags | |
object Tracing { | |
private val tracer = GlobalTracer.get | |
private val serviceName = sys.env.getOrElse("DD_SERVICE", "missing DD_SERVICE env var") |
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
#!/usr/bin/env vala --pkg gio-2.0 | |
delegate void Func(); | |
struct Box { | |
Func f; | |
} | |
async void run (Func f) { | |
var dummy = new Object (); |
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
❯ eksctl get nodegroup --cluster ${CLUSTER_NAME} -v 4 | |
2021-06-23 18:26:45 [▶] role ARN for the current session is "arn:aws:sts::<account-number>:assumed-role/DeveloperAdmin/me@me.com" | |
2021-06-23 18:26:45 [ℹ] eksctl version 0.54.0 | |
2021-06-23 18:26:45 [ℹ] using region us-east-1 | |
2021-06-23 18:26:45 [▶] cluster = { | |
Arn: "arn:aws:eks:us-east-1:<account-number>:cluster/CLUSTER_NAME", | |
CertificateAuthority: { | |
Data: "..." | |
}, | |
CreatedAt: 2021-06-23 21:23:33.914 +0000 UTC, |
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 | |
BG=(lightblue palegreen rosybrown1) | |
FG=(blue sienna purple) | |
i=0 | |
jq -r '. | map(.text) | .[]' ./*.json | while read -r str; do | |
echo $i | |
convert -size 1280x720 -background "${BG[((i % ${#BG[@]}))]}" -fill "${FG[((i % ${#FG[@]}))]}" -gravity Center -pointsize 52 "caption:$str" "$i.png" |
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
/\[block\:api-header\]/,/\[\/block\]/{ | |
/\[\/?block/d | |
/[{}]/d | |
s/\s*"title": "(.+)"/\n# \1/ | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<manifest> | |
<project name="lineageos4microg/android_prebuilts_prebuiltapks" path="prebuilts/prebuiltapks" revision="master" /> | |
<project name="PeterCxy/android_device_oneplus_guacamole" path="device/oneplus/guacamole" depth="1" /> | |
<project name="PeterCxy/android_device_oneplus_sm8150-common" path="device/oneplus/sm8150-common" depth="1" /> | |
<project name="PeterCxy/android_kernel_oneplus_sm8150" path="kernel/oneplus/sm8150" /> | |
<project name="luk1337/proprietary_vendor_oneplus" path="vendor/oneplus" depth="1" /> | |
<project name="LineageOS/android_device_oneplus_common" path="device/oneplus/common" /> | |
<project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" /> | |
</manifest> |
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 | |
while read oldrev newrev ref | |
do | |
if [[ $ref =~ .*/master$ ]]; | |
then | |
echo "Master ref received. Deploying master branch to production..." | |
git --work-tree=/home/deploy/server --git-dir=/home/deploy/server-bare checkout -f | |
else | |
echo "Ref $ref successfully received. Doing nothing: only the master branch may be deployed on this server." | |
fi |
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
class Hey : Object, Json.Serializable { | |
public bool? required; | |
private ParamSpec req = new ParamSpecVariant ("required", "required", "required", new VariantType ("mb"), null, ParamFlags.READWRITE); | |
public override void set_property (ParamSpec pspec, Value value) { | |
if (pspec.get_name () == "required") { | |
Variant v = (Variant) value; | |
if (v.get_maybe () != null) | |
required = v.get_maybe ().get_boolean (); |
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
package main | |
import ( | |
"bytes" | |
"encoding/csv" | |
"encoding/json" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"net/http" |
NewerOlder