Skip to content

Instantly share code, notes, and snippets.

View sergiitk's full-sized avatar
🚀
Back to work

Sergii Tkachenko sergiitk

🚀
Back to work
View GitHub Profile
@voxpelli
voxpelli / vptest.info
Created July 5, 2011 20:01
OAuth.module 3.x example - a test I made to verify the D7 port of the module - should work well on D6 as well though
name = VoxPelli OAuth Test
core = 7.x
dependencies[] = oauth_common
dependencies[] = http_client
@leesmith
leesmith / commit-message-syntax.txt
Created December 31, 2011 06:05
Pivotal Tracker post-commit message syntax
https://www.pivotaltracker.com/help/api?version=v3#github_hooks
https://www.pivotaltracker.com/help/api?version=v3#scm_post_commit_message_syntax
SCM Post-Commit Message Syntax
To associate an SCM commit with a specific Tracker story, you must include a special syntax in the commit message to indicate one or more story IDs and (optionally) a state change for the story. Your commit message should have square brackets containing a hash mark followed by the story ID. If a story was not already started (it was in the "not started" state), a commit message will automatically start it. For example, if Scotty uses the following message when committing SCM revision 54321:
[#12345677 #12345678] Diverting power from warp drive to torpedoes.
@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:

@sergiitk
sergiitk / shell-tools.md
Last active April 4, 2018 20:45
Useful shell tools

Useful shell tools (BSD)

Strings

  • l | tail +2 — Skip first line of stdout
  • l | head -n-1 — Skip last line of stdout (GNU version only)
  • echo "test" | head -c-1 — Remove last newline
  • comm -12 <(echo 1; echo 2) <(echo 1; echo 2; echo 3) — Shows intersection (here 1 2).
  • cat template.txt | envsubst — substitutes environment variables in file
  • echo 123abc | od -c -t d1 — Show decimal dump
  • echo 123abc | xxd — Show a hexdump (or do the reverse)
@sergiitk
sergiitk / osx-terminal.md
Last active March 8, 2024 10:32
OSX terminal tips an tricks

OS X terminal tips an tricks

Shell tools

System

  • sw_vers — Print Mac OS X operating system version information
  • system_profiler — Reports system hardware and software configuration.
  • system_profiler SPHardwareDataType — Hardware overview.
  • hostinfo — Host information.
  • nvram -p — Print all of the firmware variables.
  • getconf DARWIN_USER_CACHE_DIR — Retrieve standard configuration variables
  • /usr/libexec/path_helper — Helper for constructing PATH environment variable
# Drupal watchdog facility has its own log file
? [= Sender drupal] claim only
> /var/log/watchdog.log mode=0644 format=bsd rotate=seq compress file_max=5M all_max=50M
* file /var/log/watchdog.log
@jimschubert
jimschubert / README.md
Last active October 30, 2023 01:33
prepare-commit-msg which adds branch name and description to the end of a commit message (git hook)

Installation

To install globally, copy prepare-commit-msg to /usr/local/share/git-core/templates/hooks and execute:

chmod +x /usr/local/share/git-core/templates/hooks/prepare-commit-msg

To install per-repository, copy prepare-commit-msg to /path/to/repo/.git/hooks/prepare-commit-msg and mark it as executable.

@rmondello
rmondello / gist:b933231b1fcc83a7db0b
Last active April 5, 2024 07:10
Exporting (iCloud) Keychain and Safari credentials to a CSV file

Exporting (iCloud) Keychain and Safari credentials to a CSV file

Update (October 2021)

Exporting password + one-time code data from iCloud Keychain is now officially supported in macOS Monterey and Safari 15 (for Monterey, Big Sur, and Catalina). You can access it in the Password Manager’s “gear” icon (System Preferences > Passwords on Monterey, and Safari > Passwords everywhere else), or via the File > Export > Passwords... menu item). You shouldn't need to hack up your own exporter anymore.

Original, Obsolete Content (2014)

After my dad died, I wanted to be able to have access any of his online accounts going forward. My dad was a Safari user and used iCloud Keychain to sync his credentials across his devices. I don’t want to have to keep an OS X user account around just to access his accounts, so I wanted to export his credentials to a portable file.

@stephenlb
stephenlb / animated-gif.md
Last active October 31, 2020 22:57
DIY How to make your own HD Animated GIF Generator

HD Animated GIF Generator

You can make your own HD animated GIF generator.
Follow along with these commands to get started.

HD Animated GIF Generator

git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
@vasanthk
vasanthk / System Design.md
Last active July 4, 2024 15:09
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?