Skip to content

Instantly share code, notes, and snippets.

View andreimoment's full-sized avatar

Andrei Andreev andreimoment

View GitHub Profile
@amirrajan
amirrajan / main.rb
Created December 28, 2021 05:08
Spirit of Akina built with DragonRuby Game Toolkit
# Copyright 2021 Scratchwork Development LLC. All rights reserved.
PI = 3.1415926
class Game
attr_gtk
def tick
defaults
render
// useHotkeys.js
import hotkeys from "hotkeys-js";
export const bindHotkeys = (controller) => {
hotkeys.filter = () => true;
for (const [hotkey, handler] of Object.entries(
controller.constructor.hotkeys
)) {
hotkeys(hotkey, (e) => controller[handler](e));
@mozeago
mozeago / heroku-remote.md
Created May 27, 2020 12:41 — forked from randallreedjr/heroku-remote.md
Add a Heroku remote to an existing git repo

Working with git remotes on Heroku

Generally, you will add a git remote for your Heroku app during the Heroku app creation process, i.e. heroku create. However, if you are working on an existing app and want to add git remotes to enable manual deploys, the following commands may be useful.

Adding a new remote

Add a remote for your Staging app and deploy

Note that on Heroku, you must always use master as the destination branch on the remote. If you want to deploy a different branch, you can use the syntax local_branch:destination_branch seen below (in this example, we push the local staging branch to the master branch on heroku.

$ git remote add staging https://git.heroku.com/staging-app.git
@swyxio
swyxio / readme.md
Last active January 16, 2022 10:36
svelte society day talks and resources -
@ProGM
ProGM / arel_cheatsheet_on_steroids.md
Last active September 20, 2024 13:37
Arel cheatsheet on Steroids

Arel Cheatsheet on Steroids

A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.

Tables

posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord

Table alias

@ryenski
ryenski / hello.vue
Last active April 27, 2023 03:04
Stimulus.js + Vue.js
<template>
<div id="app">
<p>{{ message }}</p>
</div>
</template>
<script>
export default {
data: function () {
return {
@n1crack
n1crack / select2.scss
Last active August 30, 2023 11:11
scss for select2 #bulma
.select2-container {
.select2-selection--single {
transition: border-color $speed;
font-family: $family-sans-serif;
height: 2.285em;
font-size: 1rem;
outline: none !important;
display: inline-flex;
align-items: center;
@svale
svale / .block
Last active June 30, 2019 23:27
Remittances Chord Diagram
license: gpl-3.0
height: 960
border: no
@javierarques
javierarques / config.rb
Created August 22, 2017 08:00
Middleman 4 and Webpack 3 integration. Use Middleman with External Pipeline.
# ...
activate :external_pipeline,
name: :webpack,
command: build? ? "npm run build:assets" : "npm run start:assets",
source: ".tmp/webpack_output",
latency: 1
# ...