Skip to content

Instantly share code, notes, and snippets.

View MhdSyrwan's full-sized avatar

Muhammad Seyrawan MhdSyrwan

  • Istanbul, Turkey
View GitHub Profile
@revolunet
revolunet / index.js
Created September 16, 2016 14:52
Load remote components at run-time with script.js
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
// https://github.com/ded/script.js
var $script = require("scriptjs");
// load remote component and return it when ready
// display current children while loading
class LoadRemoteComponent extends Component {
@Ashwinning
Ashwinning / AddBashonUbuntuonWindowsToContextMenu.md
Last active April 11, 2022 14:31
Add Bash on Ubuntu on Windows to context menu #gistblog #ubuntu #bash #windows

Add Bash on Ubuntu on Windows to context menu

Bash on Ubuntu on Windows (installation instructions) is a Linux Subsystem for Windows.

To add it to the Windows right click context menu, perform the following steps:

  • Open regedit from the run menu Win + R.
@Vestride
Vestride / encoding-video.md
Last active June 5, 2024 14:38
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@gbot
gbot / woocommerce-login-logout-redirects.php
Last active November 16, 2021 10:11
WP: Redirect to home page for WooCommerce login and logout. #ST3
/*----------------------------------------------------------------------------*/
// redirects for login / logout
/*----------------------------------------------------------------------------*/
add_filter('woocommerce_login_redirect', 'login_redirect');
function login_redirect($redirect_to) {
return home_url();
}
@staltz
staltz / introrx.md
Last active July 19, 2024 22:21
The introduction to Reactive Programming you've been missing
@tedmiston
tedmiston / webcam-cv2.py
Last active May 4, 2023 11:56
Display the webcam in Python using OpenCV (cv2)
"""
Simply display the contents of the webcam with optional mirroring using OpenCV
via the new Pythonic cv2 interface. Press <esc> to quit.
"""
import cv2
def show_webcam(mirror=False):
cam = cv2.VideoCapture(0)
@MhdSyrwan
MhdSyrwan / RoR_installer.sh
Created March 5, 2012 21:36
RubyOnRails installer
#!/bin/bash
wget https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer
sudo /usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion coffeescript node
chmod +x rvm-installer
./rvm-installer
source ~/.rvm/scripts/rvm