Skip to content

Instantly share code, notes, and snippets.

View byassine52's full-sized avatar
:octocat:
👨‍💻

Yassine ElBadaoui byassine52

:octocat:
👨‍💻
View GitHub Profile
@npu3pak
npu3pak / fix_twitter_warnings.sh
Last active August 20, 2023 16:39
This script fixes all TwitterKit related warnings in XCode 10.1. Add new run script build phase with this code:
readonly MODULEMAP="${PODS_ROOT}/TwitterCore/iOS/TwitterCore.framework/Modules/module.private.modulemap"
readonly HEADER="${PODS_ROOT}/TwitterCore/iOS/TwitterCore.framework/Headers/TwitterCore.h"
if ! grep -q "TwitterCore_Private" "${MODULEMAP}"; then
cat >"${MODULEMAP}" <<EOL
module TwitterCore_Private {
}
EOL
fi
@nickcheng
nickcheng / gitaliases.md
Created January 26, 2018 01:16
git aliases for ignoring files locally.
git config --global alias.ignore 'update-index --skip-worktree'
git config --global alias.unignore 'update-index --no-skip-worktree'
git config --global alias.ignored '!git ls-files -v | grep "^S"'

Ref: https://stackoverflow.com/posts/39086325/revisions

@voltechs
voltechs / no_automount
Last active November 18, 2022 01:29
Add volume (UUID) to fstab to prevent automount (macOS)
#!/usr/bin/env ruby
# Usage: no_automount /Volumes/My\ Disk
diskinfo = `diskutil info '#{ARGV[0]}'`.gsub("\n\n", "\n").split("\n").collect { |b|
b.strip.split(/:\s+/)
}.to_h
disk_uuid = diskinfo['Volume UUID']
disk_type = diskinfo['Type (Bundle)']
@AliSoftware
AliSoftware / struct_vs_inheritance.swift
Last active March 27, 2024 11:57
Swift, Struct & Inheritance: How to balance the will of using Struct & Value Types and the need for Inheritance?
// #!Swift-1.1
import Foundation
// MARK: - (1) classes
// Solution 1:
// - Use classes instead of struct
// Issue: Violate the concept of moving model to the value layer
// http://realm.io/news/andy-matuschak-controlling-complexity/
@rothgar
rothgar / install-tmux
Last active April 5, 2023 06:53 — forked from ekiara/how_to_install_tmux_on_centos
Install tmux 1.9 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing
@sindresorhus
sindresorhus / post-merge
Last active May 2, 2024 03:18
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
@sky-y
sky-y / _pandoc
Created August 12, 2012 19:48
Zsh completion for pandoc
#compdef pandoc
typeset -A opt_args
local context state line
_arguments -s -S \
'(-f+ --from=+)'{-r+,--read=+}'[Specify input format.]:FORMAT:(native json markdown textile rst html docbook latex)'\
'(-r+,--read=+)'{-f+,--from=+}'[Specify input format.]:FORMAT:(native json markdown textile rst html docbook latex)'\
'(-t+ --to=+)'{-w+,--write=+}'[Specify output format.]:FORMAT:(native json plain markdown rst html html5 latex beamer context man mediawiki textile org texinfo docbook opendocument odt docx epub asciidoc slidy slideous dzslides s5 rtf)'\
'(-w+ --write=+)'{-t+,--to=+}'[Specify output format.]:FORMAT:(native json plain markdown rst html html5 latex beamer context man mediawiki textile org texinfo docbook opendocument odt docx epub asciidoc slidy slideous dzslides s5 rtf)'\
@jpantuso
jpantuso / osx_lion_rail_setup.md
Created July 27, 2011 19:51
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, rails, and MySQL