Skip to content

Instantly share code, notes, and snippets.

View alicanertop's full-sized avatar

Alican Ertop alicanertop

View GitHub Profile
@alicanertop
alicanertop / file.md
Created April 30, 2024 19:50 — forked from edjdavid/file.md
Stream Windows webcam/desktop via RTSP

Can be used for streaming data (webcam or screen capture) from the Windows to WSL

Install

  1. Simple RTSP Server
  2. ffmpeg

Get the internal IP of WSL

Run from a WSL terminal

ip route list default | awk '{print $3}'
@alicanertop
alicanertop / settings.json
Created January 19, 2024 23:49 — forked from ixahmedxi/settings.json
VSCode settings.json
{
// open json editor for settings
"workbench.settings.editor": "json",
// Theme
"workbench.colorTheme": "Aura Dark",
"workbench.iconTheme": "moxer-icons",
// Change font
"editor.fontFamily": "Geist Mono",
@alicanertop
alicanertop / Mad Games Tycoon 2 Json
Last active November 9, 2022 21:06
Mad Games Tycoon 2 Json file
{
"genreList": [
{
"name": "SkillGame",
"releaseDate": "01-01-1976",
"targetGroup": ["Children", "Teenagers", "Adults", "Seniors", "All"],
"subGenre": ["PuzzleGame", "Action", "Platformer"],
"design": [
{
"name": "Gameplay",
@alicanertop
alicanertop / YourViewController.m
Created October 24, 2022 20:44 — forked from amster/YourViewController.m
Load a UIWebView in iOS that can also load local resources like images, CSS, and JavaScript
// An example viewDidLoad
- (void)viewDidLoad
{
[super viewDidLoad];
[self loadWebView];
}
// The example loader
//
// Assumes you have an IBOutlet for the UIWebView defined: @property (strong, nonatomic) UIWebView *wv;
@alicanertop
alicanertop / README.md
Created August 31, 2022 11:41 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

const hash = require("crypto-js/sha256");
class Block {
constructor(previousHash, data) {
this.data = data;
this.hash = this.calculateHash();
this.previousHash = previousHash;
this.timeStamp = new Date();
this.proofOfWork = 0;
}
@alicanertop
alicanertop / nginx_auto_start.sh
Created August 16, 2021 12:04 — forked from aymanosman/nginx_auto_start.sh
Nginx: Start nginx on boot on Mac
# brew install nginx
sudo ln -s /usr/local/opt/nginx/homebrew.mxcl.nginx.plist /Library/LaunchDaemons/
sudo chown root:wheel /usr/local/opt/nginx/homebrew.mxcl.nginx.plist
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
# Why do you need sudo?
# If you want nginx to be able to bind to port 80, it will need superuser privileges
@alicanertop
alicanertop / MySQL_5-7_macOS.md
Created February 2, 2021 20:01 — forked from robhrt7/MySQL_5-7_macOS.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@alicanertop
alicanertop / clear-browser-cache.js
Created September 22, 2020 06:00 — forked from DavidWells/clear-browser-cache.js
Clear Browser cache. Run in your browsers javascript console
//Cache Buster
(function (){
  var rep = /.*\?.*/,
      links = document.getElementsByTagName('link'),
      scripts = document.getElementsByTagName('script'),
      process_scripts = false;
  for (var i=0;i<links.length;i++){
    var link = links[i],
        href = link.href;
    if(rep.test(href)){
@alicanertop
alicanertop / extensions
Last active December 7, 2019 08:32
Extensions sync
{"[email protected]":{"org.gnome.shell.extensions.bluetooth-quick-connect":""},"[email protected]":{"org.gnome.shell.extensions.sensory-perception":""},"[email protected]":{"org.gnome.shell.extensions.dash-to-dock":"[/]\nextend-height=false\ncustom-background-color=true\nisolate-monitors=true\ndock-fixed=false\nunity-backlit-items=false\ndash-max-icon-size=32\nrunning-indicator-dominant-color=true\ncustom-theme-shrink=true\nmulti-monitor=true\nicon-size-fixed=true\ntransparency-mode='FIXED'\nisolate-workspaces=true\npreferred-monitor=0\nforce-straight-corner=true\nautohide-in-fullscreen=true\ncustom-theme-customize-running-dots=false\nshow-delay=1.3877787807814457e-17\nshow-apps-at-top=false\napply-custom-theme=true\nanimation-time=0.050000000000000017\nheight-fraction=1.0\nhot-keys=false\nshow-windows-preview=true\nhide-delay=1.3877787807814457e-17\nrequire-pressure-to-show=false\nintellihide=true\ndock-position='BOTTOM'\nrunning-indicator-style=