Skip to content

Instantly share code, notes, and snippets.

View harshmandan's full-sized avatar
🕑
Learning. Please wait . . .

Harsh Mandan harshmandan

🕑
Learning. Please wait . . .
  • India
View GitHub Profile

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server:

@mondain
mondain / public-stun-list.txt
Last active November 18, 2024 05:27
Public STUN server list
23.21.150.121:3478
iphone-stun.strato-iphone.de:3478
numb.viagenie.ca:3478
s1.taraba.net:3478
s2.taraba.net:3478
stun.12connect.com:3478
stun.12voip.com:3478
stun.1und1.de:3478
stun.2talk.co.nz:3478
stun.2talk.com:3478
@ShinJJang
ShinJJang / detect.java
Last active December 5, 2021 16:00
Test for detect virtual device in android
// This is not perfect
private boolean isVirtualDeivce() {
String msg = "BOARD = " + Build.BOARD +
"\nBOOOTLOADER = " + Build.BOOTLOADER +
"\nBRAND = " + Build.BRAND +
"\nDEVICE = " + Build.DEVICE +
"\nDISPLAY = " + Build.DISPLAY +
"\nFINGERPRINT = " + Build.FINGERPRINT +
"\nHARDWARE = " + Build.HARDWARE +
"\nHOST = " + Build.HOST +
@notakaos
notakaos / create_function_plv8_cuid.sql
Last active August 16, 2024 10:10
cuid for PostgreSQL with PL/v8
-- original code: https://github.com/ericelliott/cuid
-- Add the "plv8" extension
create extension if not exists "plv8";
-- Add the "pgcrypto" extension
create extension if not exists "pgcrypto";
\dx
-- Connect a database
@bwonur
bwonur / HOW TO ZOOM IMAGE WITH PURE JAVASCRIPT.md
Created January 27, 2020 14:23
HOW TO ZOOM IMAGE WITH PURE JAVASCRIPT

When you are building an e-commerce website, especially a showcase, a website gallery, a template selling website ..., you always need many good images for using and giving your visitors/customers the detailed view of your images (or your product). I believe that every shopping website has ability zoom the product image. All of them are using jQuery plugins such as jQuery Zoom or EasyZoom After I think how would I implements this plugin I realized that we do not need jQuery for that. So let us go step by step and implement image zoom without jQuery.

We will have next html template:

`

` We will display a small image and set the background for figure element with the same image but without scaling. We are going to fade out the image and change background position of figure element based on cursor coordinates.
@harshmandan
harshmandan / Install android sdk on command line or terminal on Ubuntu 18.04 or 20.04
Created June 7, 2020 11:21
Follow these instruction to install Android SDK on a AWS EC2/DigitalOcean droplet or any other VPS instance where you do not have access to a GUI. Or if you just want the build tools/sdk without android studio.
#This is going to be our sdk installation directory
cd /home
#Install JDK first
sudo apt install openjdk-8-jdk
#Some utilities
sudo apt-get install unzip
sudo apt-get install git
@ryangatchalian912
ryangatchalian912 / uninstall-node.sh
Last active April 26, 2024 18:07 — forked from omarrr/uninstall-node.sh
Mac OS X uninstall script for packaged install of Node.js
#!/bin/bash
(( ${#} >= 0 )) || {
echo 'DISCLAIMER: USE THIS SCRIPT AT YOUR OWN RISK!'
echo 'THE AUTHOR TAKES NO RESPONSIBILITY FOR THE RESULTS OF THIS SCRIPT.'
echo "Disclaimer aside, this worked for the author, for what that's worth."
echo 'Press Control-C to quit now.'
read
echo 'Re-running the script with sudo.'
echo 'You may be prompted for a password.'
@khalidx
khalidx / node-typescript-esm.md
Last active November 14, 2024 08:26
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json