Skip to content

Instantly share code, notes, and snippets.

@angstyloop
angstyloop / DraggableSprite.gd
Last active December 24, 2023 23:11
A GDScript example - a single node game that lets you move a sprite around with the mouse, with or without having to hold the mouse button down. Tested with the standard edition (no C# support) of Godot v3.5.1
# DESCRIPTION
#
# This is a simple Godot game that lets you move a sprite around in two ways:
#
# * by clicking, and then without moving, releasing. Then you can drag
# the sprite around without holding down the mouse button. When you
# want to drop the sprite, release the mouse button.
#
# * by clicking, and then while holding the mouse button down, dragging
# the sprite to where you want it by moving the mouse. When you want
@Turupawn
Turupawn / SteamworksCreate.cpp
Last active September 22, 2022 17:19
Steamworks Create Example
#include <iostream>
#include "steam_api.h"
//The Game Manager class is needed to handle Steamworks callbacks
class CGameManager
{
public:
void CreateItem();
bool finished = false;
@SirFroweey
SirFroweey / soundcloud_api_client.py
Last active February 2, 2024 13:55
Download SoundCloud Track via SoundCloud API
import mechanize
from lxml import etree
import json
__author__ = "https://github.com/SirFroweey/"
class SoundCloud:
"""
@wbotelhos
wbotelhos / clear-sidekiq-jobs.sh
Last active June 13, 2024 22:47
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@mlanett
mlanett / rails http status codes
Last active June 14, 2024 06:07
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@bosskovic
bosskovic / Gemfile
Last active September 21, 2022 14:24
Devise as authentication solution for rails API
gem 'devise', '3.2.4'
gem 'simple_token_authentication', '1.5.0'
@anthonywu
anthonywu / quick_install_memcached_mac.sh
Created May 8, 2013 18:23
Quick install memcached on Mac OS X
# install via Homebrew
brew install memcached
# optional: make memcached start along with the system
ln -sfv /usr/local/opt/memcached/*.plist ~/Library/LaunchAgents
# load memcached now for immediate use
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist
# check the process that just launched
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: