Skip to content

Instantly share code, notes, and snippets.

View farbod-s's full-sized avatar
🎯
Focused!

Farbod Samsamipour farbod-s

🎯
Focused!
View GitHub Profile
@zpoint
zpoint / v2ray_wireguard_netflix_spotify_hulu.md
Last active June 3, 2025 07:54
v2ray + wireguard to unblock gfw and netflix,spotify,hulu

I previously write a gist about how to set up v2ray + openvpn to unblock gfw and netflix

Refers to that gist for more detail.

In short, this a solution to proxy your network to bypass Firewall with stable connections, and also unblock Proxy detection for Netflix/Spotify/etc....

In my use case from China network:

wireguard

@zpoint
zpoint / v2ray_openvpn_netflix.md
Last active November 6, 2024 20:25
v2ray + openvpn to unblock gfw and netflix

If you're using wireguard please refer to v2ray+wireguard to bypass GFW and netflix/spotify/hulu

Two things need to be paid

  • vps(such as bandwagonhost)
    • If you are using China Telecom, a CN2 network is required, or you may get stuck when streaming video
    • For bandwagonhost, you need to login, click Client Area -> Services -> Order New Services to get CN2 server
  • vpn vendor to unblock netflix(a openvpn connection that can unblock netflix)

vpn

@camargo
camargo / RubiksCube.md
Last active January 18, 2025 10:58
Solving a Rubik's Cube

Solving a Rubik's Cube (Beginner)

Steps taken from: How to Solve a Rubik's Cube | WIRED

  1. Make the daisy
  2. Create the white cross
  3. Solve the first layer
  4. Solve the second layer
  5. Create the yellow cross:
  • F U R U' R' F'
@objcode
objcode / ConcurrencyHelpers.kt
Last active June 29, 2025 09:42
Helpers to control concurrency for one shot requests using Kotlin coroutines.
/* Copyright 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@elizarov
elizarov / Main.kt
Created March 9, 2018 10:05
Kotlin Coroutines, a deeper look
// Inspired by http://akarnokd.blogspot.ru/2017/09/rxjava-vs-kotlin-coroutines-quick-look.html
// Requires Kotlin 1.2.30 or later
// Uses kotlinx.coroutines library
import kotlinx.coroutines.experimental.*
import kotlin.system.*
suspend fun f1(i: Int): Int {
println("f1 attempt $i")
delay(if (i != 3) 2000 else 200)
package com.google.firebase.udacity.friendlychat
import com.google.firebase.database.ChildEventListener
import com.google.firebase.database.DataSnapshot
import com.google.firebase.database.DatabaseError
class _ChildEventListener(
private val _onCancelled: (DatabaseError) -> Unit,
private val _onChildMoved: (DataSnapshot, String?) -> Unit,
private val _onChildChanged: (DataSnapshot, String?) -> Unit,
@agarwalparas
agarwalparas / gist:d355a950148702cc7ba82abc4d1943bf
Created November 3, 2017 04:06
Recover Force Push on Github
# First, you must get the previous commit sha, the one before the forced push:
## Hit through terminal
curl -u <username> https://api.github.com/repos/:owner/:repo/events
# Then you can create a branch from this sha:
## Hit through terminal
curl -u <github-username> -X POST -d '{"ref":"refs/heads/<new-branch-name>", "sha":"<sha-from-step-1>"}' https://api.github.com/repos/:owner/:repo/git/refs
@florina-muntenescu
florina-muntenescu / BaseDao.kt
Last active January 1, 2025 06:52
Use Dao inheritance to reduce the amount of boilerplate code - https://medium.com/google-developers/7-pro-tips-for-room-fbadea4bfbd1
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software