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 say(a) { | |
cleanUp = function(str) { | |
return str.replace(/[^a-zA-Z0-9]+/, ""); | |
} | |
addDashes = function(str) { | |
return cleanUp(str).split("").join("-"); | |
} | |
return function(b) { |
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
## Requires newer versions of ubuntu, I'm using Ubuntu 20 | |
# install nginx | |
sudo apt install nginx | |
# add php8.X repository | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt update | |
# search libraries |
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 Test | |
@stored = [] of Proc(Nil) | |
def captured(&block) | |
@stored << block | |
end | |
def example | |
@stored.each do |b| | |
b.call() | |
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
def to_hex(decimal) | |
decimal_remainder = decimal % 16 | |
hexchars = "0123456789ABCDEF" | |
div = decimal / 16 | |
if div == 0 | |
hexchars[decimal_remainder].to_s | |
else | |
to_hex(div) + hexchars[decimal_remainder].to_s | |
end | |
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
<?php | |
class Kernel extends BaseKernel | |
{ | |
use MicroKernelTrait; | |
const CONFIG_EXTS = '.{php,xml,yaml,yml}'; | |
public function getCacheDir() | |
{ |
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 | |
namespace App\EventSubscriber; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
use Symfony\Component\HttpFoundation\RedirectResponse; | |
use Symfony\Component\HttpFoundation\Session\SessionInterface; | |
use Symfony\Component\HttpKernel\Event\FilterControllerEvent; | |
use Symfony\Component\HttpKernel\KernelEvents; | |
/** |
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 | |
namespace Deployer; | |
require 'recipe/common.php'; | |
//Project Name | |
set('application', 'app_name'); | |
// Project repository | |
set('repository', 'git@bitbucket.org:USER/REPO.git'); |
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
public class PckFileExposer : IDisposable | |
{ | |
private byte[] _data; | |
private string _filename; | |
private string _tmpDataFilename; | |
private bool _disposed; | |
public PckFileExposer(string filename) | |
{ |
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
func _physics_process(delta): | |
var direction = Vector2() | |
# .. figure out the direction | |
var collision = move_and_collide(direction) | |
if collision: | |
handle_collision(collision) | |
func handle_collision(node): | |
var collider = get_collider() |
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
17809ca9a907b8d48bea2fd26ea42312a9eaaca4 Merge pull request #25764 from akien-mga/scons-relative-import | |
5892b122819091c026f546c1766cdbc06b6e87c8 Merge pull request #25763 from akien-mga/scons-decider | |
26a547f7fce022dd5565c95b90c79f412943c90f Merge pull request #25762 from akien-mga/tests-gdscript | |
644b266bae483c903d7c588b38002e4c0ad21054 SCons: Fix import clash between Godot and system modules | |
2be62587eecbcad855d2d864af13ea407596ed8b SCons: Make MD5-timestamp decider and implicit_cache debug-only | |
c3638574267b0af5ca086b923e1c1777d1dd131d Be explicit about usage of GDScript tests | |
f614f155063e43733c5e4c2572b4ea67b3bcc661 doc: Misc formatting fixes | |
ba0a4a942e9997f9238c4f6a0fb141702316788e i18n: Sync translation template with current source | |
dc239b47b3c09a0f2900151bcdaeca38ddcb7595 i18n: Sync translations with Weblate | |
74932b905e928015394aff68a0502a49994d47f7 doc: Sync classref with current source |