Skip to content

Instantly share code, notes, and snippets.

View GalenkoEugene's full-sized avatar
💭
🇺🇦

Yevhenii Halenko GalenkoEugene

💭
🇺🇦
View GitHub Profile
@GalenkoEugene
GalenkoEugene / AG tutorial.md
Created February 22, 2023 09:22 — forked from sonulohani/AG tutorial.md
AG tool cheatsheet
  • Find files containing "foo", and print the line matches in context: ag foo
  • Find files containing "foo" in a specific directory: ag foo path/to/directory
  • Find files containing "foo", but only list the filenames: ag -l foo
  • Find files containing "FOO" case-insensitively, and print only the match, rather than the whole line: ag -i -o FOO
  • Find "foo" in files with a name matching "bar": ag foo -G bar
@xhocquet
xhocquet / config.yml
Created October 12, 2018 22:55
Rubocop + CircleCI
# One of the steps, insert where you wish:
- run:
name: run rubocop
command: |
source /home/circleci/.rvm/scripts/rvm
rvm --default use 2.3.1
bash bin/rubocop.sh
# Remove the RVM lines if not needed for your setup
@alexpchin
alexpchin / socket-cheatsheet.js
Created December 15, 2015 16:58
A quick cheatsheet for socket.io
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender
@bkimble
bkimble / gist:1365005
Last active May 2, 2024 01:27
List local memcached keys using Ruby
#!/usr/bin/env ruby
# List all keys stored in memcache.
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place.
require 'net/telnet'
headings = %w(id expires bytes cache_key)
rows = []