Skip to content

Instantly share code, notes, and snippets.

View mehmetboraezer's full-sized avatar

Mehmet Bora Ezer mehmetboraezer

View GitHub Profile
@igorvoltaic
igorvoltaic / Python36-on-macbook-m1.sh
Last active December 23, 2021 22:42
Step-by-step Python 3.6.x installation process on Apple Macbook M1 with Mac OS X Big Sur
# 0. [OPTIONAL] In case: `Error: Failed to link all completions, docs and manpages: Permission denied @ rb_file_s_symlink`
sudo chown -R $(whoami) /usr/local/share/zsh
# 1. Install x86_64 Homebrew version:
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# 2. In case `brew --prefix` is not `/usr/local` run this (for zsh) and restart the terminal:
echo 'export PATH="/usr/local/bin/:/usr/local/sbin:$PATH"' >> ~/.zshrc
@dsalahutdinov
dsalahutdinov / Dockerfile.dev
Last active May 25, 2021 21:02
Dockerize Ruby backend of the multi-service application for local development
FROM ruby:2.6.1
ARG PG_VERSION
ARG NODE_VERSION
ARG TINI_VERSION=v0.18.0
RUN curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' $PG_VERSION > /etc/apt/sources.list.d/pgdg.list \
&& curl -o /tmp/nodejs.deb https://deb.nodesource.com/node_11.x/pool/main/n/nodejs/nodejs_$NODE_VERSION-1nodesource1_amd64.deb \
&& apt-get update -qq \
require "benchmark"
iteration = 10000000
Benchmark.bm do |bm|
bm.report("method") do
class RPC0
def new_address
"0"
end
@jolexa
jolexa / invalidate-all.py
Created October 24, 2018 14:07
Invalidate CloudFront Cache with boto3
from time import time
import sys
import boto3
client = boto3.client('cloudfront')
# Uncomment this to pass a URL to the script
#def get_id(url):
# print("get_id args: {0}".format(url))
# # url: asdf.cloudfront.net
# # return: E2134123ASDF
@zouhuan1215
zouhuan1215 / getTransaction.md
Last active September 8, 2021 16:45
Week 6 -- Data structure in ethereum


Core data structure in Ethereum | Go to the image source

As an overview of this post, following topics will be discussed:

@BenSampo
BenSampo / deploy.sh
Last active June 18, 2024 01:44
Laravel deploy script
# Change to the project directory
cd $FORGE_SITE_PATH
# Turn on maintenance mode
php artisan down || true
# Pull the latest changes from the git repository
# git reset --hard
# git clean -df
git pull origin $FORGE_SITE_BRANCH
@miglen
miglen / osx_wifi_strenght_command_line.sh
Created January 14, 2018 18:46
Mac OS X Wifi Signal strength meter command line
#!/bin/bash
# Simple command to display the wireless strenght signal
#
clear
while x=1
do /System/Library/PrivateFrameworks/Apple*.framework/Versions/Current/Resources/airport -I \
| grep CtlRSSI \
| sed -e 's/^.*://g' \
| xargs -I SIGNAL printf "\rWifi dBm: SIGNAL"
sleep 0.5
@seco
seco / aws-afterfx-video.md
Created September 21, 2017 01:50
Setting up After Effects on AWS with Windows Server 2012

Setting up After Effects on AWS with Windows Server 2012

Hold on to your pants. This is a bit nuts.

Generating an Adobe After Effects installer:

  • Sign in to our Adobe Team account, go to 'Manage Team', download CCPLauncher.exe for windows.
  • This can be used to create a promptless installer for After FX.
  • Boot up a windows VM, preferably Windows 7 or newer.
  • Copy the CCPLauncher.exe to the VM's Desktop
  • Run the program. Follow the prompts in a windows box to generate the installer package.
@lmakarov
lmakarov / lambda-basic-auth.js
Created August 30, 2017 19:15
Basic HTTP Authentication for CloudFront with Lambda@Edge
'use strict';
exports.handler = (event, context, callback) => {
// Get request and request headers
const request = event.Records[0].cf.request;
const headers = request.headers;
// Configure authentication
const authUser = 'user';
const authPass = 'pass';
@caseywatts
caseywatts / quicktime-hangouts-recording.md
Last active February 14, 2024 02:18
Quicktime Hangouts Recording (using soundflower for audio)

Short link to this page: caseywatts.com/quicktime

Other gists & tricks: http://caseywatts.com/gists-and-tricks

Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book

Quicktime + Hangouts Recording

Scenario: You want to talk with someone over google hangouts (like for a user study), and you want to record BOTH: