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
--- | |
- hosts: all | |
become: true | |
become_user: root | |
tasks: | |
- name: Get the list of services | |
service_facts: | |
- name: Disable ModemManager 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
# %% | |
import json | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from datetime import datetime | |
def datetime_from_js_isoformat(string: str) -> datetime: | |
"""Creates a datetime object from a JavaScript ISO format string.""" | |
if string.endswith('Z'): |
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
cmake_minimum_required(VERSION 3.5) | |
project (Codingame) | |
#add_executable(nonogram-inversor puzzle/nonogram-inversor.cpp) | |
#add_executable(ocean-of-code contest/ocean-of-code.cpp) | |
add_executable(spring-challenge-2020 contest/spring-challenge-2020.cpp) |
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
# Configure Windows | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
# Allow running PowerShell scripts | |
Update-ExecutionPolicy Unrestricted | |
# Allow unattended reboots | |
$Boxstarter.RebootOk=$false | |
$Boxstarter.AutoLogin=$false |
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
#pragma comment(lib, "windowsapp") | |
#include <chrono> | |
#include <winrt/base.h> | |
using namespace std::chrono_literals; | |
using namespace winrt; | |
using namespace winrt::Windows::Foundation; | |
IAsyncAction foo() |
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
<Style x:Key="SliderStyle1" TargetType="Slider"> | |
<Setter Property="Background" Value="{ThemeResource SliderTrackFill}"/> | |
<Setter Property="BorderThickness" Value="{ThemeResource SliderBorderThemeThickness}"/> | |
<Setter Property="Foreground" Value="{ThemeResource SliderTrackValueFill}"/> | |
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/> | |
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/> | |
<Setter Property="ManipulationMode" Value="None"/> | |
<Setter Property="UseSystemFocusVisuals" Value="True"/> | |
<Setter Property="FocusVisualMargin" Value="-7,0,-7,0"/> | |
<Setter Property="IsFocusEngagementEnabled" Value="True"/> |
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
function ping_gw() { | |
ping -c 1 google.com > /dev/null && return 0 || return 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
import json | |
import subprocess | |
temp = subprocess.check_output('cat /sys/class/thermal/thermal_zone0/temp | cut -c1-2', shell=True) | |
load = subprocess.check_output("uptime | awk '{print $10}' | head -c-2", shell=True) | |
mem_total = subprocess.check_output("free |grep 'Mem:' | awk '{print $2}'", shell=True) | |
mem_used = subprocess.check_output("free |grep 'Mem:' | awk '{print $3}'", shell=True) | |
disk_total = subprocess.check_output("df | grep '/' | awk '{print $2}'", shell=True) | |
disk_used = subprocess.check_output("df | grep '/' | awk '{print $3}'", shell=True) |
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
# This file describes the standard way to build Docker, using docker | |
# | |
# Usage: | |
# | |
# # Assemble the full dev environment. This is slow the first time. | |
# docker build -t docker . | |
# | |
# # Mount your source in an interactive container for quick testing: | |
# docker run -v `pwd`:/go/src/github.com/docker/docker --privileged -i -t docker bash | |
# |
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
export $(xargs -0 -n1 < /proc/1/environ) |