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
-- Drop all triggers | |
DO $$ | |
DECLARE | |
r RECORD; | |
BEGIN | |
-- Loop through all tables in the 'public' schema | |
FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = 'public') | |
LOOP | |
-- Drop all triggers associated with each table | |
EXECUTE 'DO $$ BEGIN EXECUTE ''DROP TRIGGER IF EXISTS ALL ON ' || quote_ident(r.tablename) || '''; EXCEPTION WHEN others THEN NULL; END $$;'; |
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 | |
apt update && curl -sL https://get.docker.com | bash -s | |
cat <<EOF > /etc/systemd/system/jeager.service | |
[Unit] | |
Description=Jaeger monitoring service | |
After=local-fs.target docker.service | |
Requires=local-fs.target | |
[Service] |
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
/// Allow to redirect logs from process stdout, stderr to tracing log. | |
/// | |
/// # Examples | |
/// | |
/// ```ignore | |
/// use std::process::Stdio; | |
/// use tokio::process::Command; | |
/// use ephyr_log::{log, init, Level, run_log_redirect}; | |
/// | |
/// init(Some(Level::INFO)); |
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/sh | |
if [[ $# -ne 2 ]] ; then | |
echo "Usage: git-split.sh original copy" | |
exit 0 | |
fi | |
git mv $1 $2 | |
git commit -n -m "Split history $1 to $2" | |
REV=`git rev-parse HEAD` |
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 | |
adb push $1 /data/local/tmp/app.apk | |
adb shell pm install -i "com.android.vendoring" -r /data/local/tmp/app.apk | |
adb shell rm /data/local/tmp/app.apk |
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 bash | |
sudo apt update | |
sudo apt install -y tclsh pkg-config cmake libssl-dev build-essential git tmux | |
git clone --depth 1 --branch v1.4.2 https://github.com/Haivision/srt.git | |
cd srt | |
./configure --prefix=/usr | |
make | |
sudo make install | |
cd .. |
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 DynamicEnumGetter(object): | |
def __init__(self, fget=None): | |
self.fget = fget | |
def __get__(self, instance, ownerclass=None): | |
return self.fget(ownerclass) | |
class BrowserType(Enum): | |
EDGE_LEGACY = "edgelegacy" | |
EDGE_CHROMIUM = "edgechromium" | |
EDGE_CHROMIUM_ONE_VERSION_BACK = "edgechromium-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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Cross SDK test</title> | |
<style> | |
div { | |
font-family: "Arial", sans-serif; |
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
import inspect | |
def proxy_to(proxy_obj_name, fields): | |
# type: (Text, List[Text]) -> Callable | |
""" | |
Adds to decorated class __getter__ and __setter__ methods that allow to access | |
attributes from proxy_object in the parent class | |
:param proxy_obj_name: The name of the proxy object that has decorated class. |
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
version: '2.2' | |
services: | |
web: | |
volumes: | |
- /mnt/HC_Volume_4511185:/var/azuracast/stations | |
stations: | |
volumes: |
NewerOlder