Skip to content

Instantly share code, notes, and snippets.

View igolden's full-sized avatar

Ian Golden igolden

View GitHub Profile
waldson / php.vim
Created July 18, 2018 17:14
FZF + Ultisnips to generate method completion
View php.vim
function! s:createSnippet(line)
let l:signature = matchstr(a:line, '\v\s+[a-z0-9A-Z_]+\s*\(.*\)')
let l:methodName = substitute(substitute(l:signature, '(.*$', '', 'g'), '\s', '', 'g')
let l:paramList = []
let l:params = substitute(l:signature, '\$[a-zA-Z0-9_]\+', '\=add(l:paramList, submatch(0))', 'g')
let l:templateParams = []
for p in l:paramList
View shy-sort.html
<!doctype html>
<!-- This is just a very slightly modified tracking.js demo: -->
<meta charset="utf-8">
<script src=""></script>
<script src=""></script>
video, canvas {
margin-left: 100px;
schweigert / Embedding GoLang into a Ruby
Last active November 24, 2023 17:40
Embedding GoLang into a Ruby application - Blogpost to Magrathealabs
View Embedding GoLang into a Ruby

Go Title

I am passionate about Ruby, but its execution time compared to other languages is extremely high, especially when we want to use more complex algorithms. In general, data structures in interpreted languages become incredibly slow compared to compiled languages. Some algorithms such as ´n-body´ and ´fannkuch-redux´ can be up to 30 times slower in Ruby than Go. This is one of the reasons I was interested in embedding Go code in a Ruby environment.

For those who do not know how shared libraries operate, they work in a similar way as DLLs in Windows. However, they have a native code with a direct interface to the C compiler.

Note Windows uses the DLL system, and in this case, this does not necessarily have to be in native code.

One example is DLLs written in C#, which runs on a virtual machine. Because I do not use windows, I ended up not testing if it is poss

deadprogram / mqttdash.go
Last active September 20, 2017 21:43
Simple Golang dashboard to show MQTT server activity by subscribing to all messages.
View mqttdash.go
// how to run:
// go run mqtt.go tcp:// /topic/name
package main
import (
mqtt ""
samsheffield / UnityCodingCheatSheet.txt
Last active November 29, 2023 16:18
Unity C# Cheat Sheet
View UnityCodingCheatSheet.txt
// Unity C# Cheat Sheet
// I made these examples for students with prior exerience working with C# and Unity.
// Too much? Try Unity's very good tutorials to get up to speed:
leonardofed /
Last active December 2, 2023 09:35
A curated list of AWS resources to prepare for the AWS Certifications

A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

varyonic / docker-compose.yml
Last active May 18, 2021 13:18
Capybara standalone Selenium Chrome config
View docker-compose.yml
build: .
- .:/opt/myapp
- '3000:3000'
- db
- redis
- selenium
BretFisher / .travis.yml
Created February 15, 2016 21:26
Travis-CI Docker Image Build and Push to AWS ECR
View .travis.yml
sudo: required #is required to use docker service in travis
language: php #can be any language, just php for example
- docker # required, but travis uses older version of docker :(
- echo "install nothing!" # put your normal pre-testing installs here
View react-lifecycle-parent-child.jsx
import React from "react";
import { render } from "react-dom";
const ParentComponent = React.createClass({
getDefaultProps: function() {
console.log("ParentComponent - getDefaultProps");
getInitialState: function() {
console.log("ParentComponent - getInitialState");
return { text: "" };
enpe / CMakeLists.txt
Last active November 25, 2022 04:15
OpenCV chroma key
View CMakeLists.txt
cmake_minimum_required( VERSION 3.0 )
project( so-opencv-calibration )
find_package( OpenCV 3.0.0 EXACT REQUIRED )
set( INPUT_FILENAME "${CMAKE_CURRENT_LIST_DIR}/input_00.png" ) # Input file, e.g.
add_executable( mwe mwe.cpp )
target_compile_definitions( mwe PRIVATE -DINPUT_FILENAME="${INPUT_FILENAME}" )
target_include_directories( mwe PRIVATE ${OpenCV_INCLUDE_DIRS} )
target_link_libraries( mwe ${OpenCV_LIBS} )