Skip to content

Instantly share code, notes, and snippets.

View souhaiebtar's full-sized avatar
:octocat:
Focusing

souhaiebtar

:octocat:
Focusing
View GitHub Profile
@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
@noelboss
noelboss / git-deployment.md
Last active March 7, 2024 02:21
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@tonysneed
tonysneed / Mac OS X: Open in Visual Studio Code
Last active March 27, 2024 10:02
Add a command to Finder services in Mac OSX to open a folder in VS Code
- Open Automator
- File -> New -> Service
- Change "Service Receives" to "files or folders" in "Finder"
- Add a "Run Shell Script" action
- Change "Pass input" to "as arguments"
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*"
- Save it as something like "Open in Visual Studio Code"
@PedroHLC
PedroHLC / photoshop.pol.sh
Last active January 9, 2023 21:37
PlayOnLinux script for installing any photoshop version (x86) using winetricks
#!/bin/bash
# Create wineprefix using this script, install Photoshop, do not run it, then change wine version to '1.7.41-PhotoshopBrushes' emulating 'win7'
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
PREFIX='Photoshop'
WINEVERSION='1.9.3-staging'
TITLE='Adobe Photoshop'
EDITOR='Adobe Systems Inc.'
@justbuchanan
justbuchanan / sources.list
Created September 16, 2015 20:21
/etc/apt/sources.list from an Ubuntu 14.04 installation
#deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
@ryanpcmcquen
ryanpcmcquen / .osx
Last active February 12, 2024 01:22
.osx
#!/usr/bin/env bash
# curl -o ~/.osx https://gist.githubusercontent.com/ryanpcmcquen/b2e608311f286a4ab3e1/raw/.osx && bash ~/.osx
###############################################################################
# General UI/UX #
###############################################################################
# Disable smart dashes as they’re annoying when typing code.
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
@wiledal
wiledal / shake.js
Created March 14, 2015 21:56
Simple shake animation for TweenMax (gsap.js). For modern form error feedback.
function shakeAnimation(element){
TweenMax.to(element, .1, {
x: -7,
ease: Quad.easeInOut
});
TweenMax.to(element, .1, {
repeat: 4,
x: 7,
yoyo: true,
delay: .1,
@somerandomnerd
somerandomnerd / EnableNaturalScrolling.scpt
Last active October 13, 2022 15:37
Quickly Enable/Disable natural scrolling on OSX
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.trackpad"
end tell
tell application "System Events"
tell process "System Preferences"
click radio button "Scroll & Zoom" of tab group 1 of window "Trackpad"
set theCheckbox to checkbox 1 of tab group 1 of window "Trackpad"
@samsonasik
samsonasik / symfony-tips1-prod-dev.md
Last active April 5, 2021 12:50
symfony tips 1 - switch dev - prod or prod - dev again