Discover gists
This short guide will walk you through hosting your very own telegram bot on Ubuntu (tested on Ubuntu 18.04 and 20.04)!
This guide assumes knowledge of the following:
1) Provisioning a VPS
2) Familiarity with SSH
3) Familiarity with linux command line
Note: There is a newly maintained community documentation site for all of Trackmania's APIs!
Visit it at: https://webservices.openplanet.dev/
This guide will explain how to authenticate with Nadeo's API. There are 2 methods of doing so, one is via a Ubisoft account, and one is via a dedicated server account. Note that the dedicated server account way is easier but imposes some limitations on what you can access with the API, but it could be enough.
Refer to my Nadeo Go package for a complete example.
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
MIT License | |
Copyright (c) 2018 Noel Bundick | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
<?php | |
it('redirects to the correct Google sign in url', function () { | |
$driver = Mockery::mock('Laravel\Socialite\Two\GoogleProvider'); | |
$driver->shouldReceive('redirect') | |
->andReturn(new RedirectResponse('https://redirect.url')); | |
Socialite::shouldReceive('driver')->andReturn($driver); | |
$this->get(route('oauth.redirect', 'google')) |
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
defmodule OperationsTest do | |
use ExUnit.Case, async: true | |
def make_mod() do | |
String.to_atom("Elixir.Test#{System.unique_integer([:positive])}") | |
end | |
describe "operation/2" do | |
setup do | |
mod = make_mod() |
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
shader_type canvas_item; | |
const vec4 background = vec4(1., 1., 1., 0.); | |
float dist(vec4 c1, vec4 c2) { | |
return (c1 == c2) ? 0.0 : abs(c1.r - c2.r) + abs(c1.g - c2.g) + abs(c1.b - c2.b); | |
} | |
bool similar(vec4 c1, vec4 c2, vec4 input) { | |
return (c1 == c2 || (dist(c1, c2) <= dist(input, c2) && dist(c1, c2) <= dist(input, c1))); |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\SOFTWARE\Francophonie\Eudic\Customer Info] | |
"SerialCode"="cracked by Archon" | |
"TimesLeft3"=dword:000c85e7 | |
"regDate"="2024/1/1 00:00:00" | |
"LicenseCode"="cracked by Archon" |
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
# Start the tmux session if not alraedy in the tmux session | |
if [[ ! -n $TMUX ]]; then | |
# Get the session IDs | |
session_ids="$(tmux list-sessions)" | |
# Create new session if no sessions exist | |
if [[ -z "$session_ids" ]]; then | |
tmux new-session | |
fi |
NewerOlder