All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Register

Login


All New Register Login

All gists

Recently created
Least recently created
Recently updated
Least recently updated
aimerneige's Avatar

aimerneige / Install Docker on Ubuntu

0 likes
0 forks
5 files
Last active 1 year ago

Install Docker on Ubuntu

  • https://docs.docker.com/engine/install/ubuntu/
anduin's Avatar

anduin / 汇编入门

0 likes
0 forks
1 files
Last active 1 year ago
Embed Assembly in C
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include <sys/mman.h>
5 #include <unistd.h>
6
7 unsigned char add_bin[] = {
8 // 这里是针对 x86_64 架构的 add 函数的二进制机器码
9 0x55, // push %rbp
10 0x48, 0x89, 0xe5, // mov %rsp,%rbp
anduin's Avatar

anduin / Docker install tzdata

0 likes
0 forks
1 files
Last active 1 year ago
1 RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
2 apt-get install -y tzdata && \
3 echo "Etc/UTC" > /etc/timezone && \
4 ln -fs /usr/share/zoneinfo/UTC /etc/localtime && \
5 dpkg-reconfigure -f noninteractive tzdata
aimerneige's Avatar

aimerneige / readme.md

0 likes
0 forks
1 files
Last active 1 year ago

Turn off screen immediately after lock screen in Windows

  • https://learn.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/monitor-powers-off-when-pc-locked
  • https://superuser.com/questions/1734226/windows-10-will-not-turn-off-display-when-screen-is-locked
anduin's Avatar

anduin / Azure Service Bus to Kusto

0 likes
0 forks
2 files
Last active 1 year ago
1 using System.ComponentModel;
2 using System.Data;
3 using System.Text;
4 using Aiursoft.Canon;
5 using Azure.Identity;
6 using Azure.Messaging.ServiceBus;
7 using Kusto.Data;
8 using Kusto.Ingest;
9 using Microsoft.Extensions.DependencyInjection;
10 using Microsoft.Extensions.Logging;
anduin's Avatar

anduin / CUDA monte carlo estimate pi

0 likes
0 forks
1 files
Last active 1 year ago
monte carlo estimate pi
1 #include <iostream>
2 #include <curand.h>
3 #include <curand_kernel.h>
4
5 __global__ void calculate_pi(int *count, unsigned long seed) {
6 int idx = threadIdx.x + blockIdx.x * blockDim.x;
7 curandState state;
8 curand_init(seed, idx, 0, &state);
9
10 float x = curand_uniform(&state);
aimerneige's Avatar

aimerneige / install-beta-neovim.sh

0 likes
0 forks
1 files
Last active 1 year ago
1 sudo add-apt-repository ppa:neovim-ppa/unstable
2 sudo apt-get update
3 sudo apt-get install neovim
aimerneige's Avatar

aimerneige / keygen.sh

0 likes
0 forks
1 files
Last active 1 year ago
1 if [ -f $HOME/.ssh/id_ed25519 ]; then echo "sshkey exists."; else ssh-keygen -t ed25519 -C "your_email@example.com"; fi
aimerneige's Avatar

aimerneige / remove-all-snap.sh

0 likes
0 forks
1 files
Last active 1 year ago
1 snap list | awk 'NR > 1 {print $1}' | while read line; do sudo snap remove --purge $line; done
anduin's Avatar

anduin / fake service.yml

0 likes
0 forks
1 files
Last active 2 years ago
Make any docker service fake
1 # Fake entrypoint for the service. Always sleep.
2 entrypoint: ["sleep", "infinity"]
3 # Fake healthcheck for the service. Always return true.
4 healthcheck:
5 test: ["CMD", "true"]
Newer Older

Powered by Opengist ⋅ Load: 56ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文