Skip to content

Instantly share code, notes, and snippets.

View oivoodoo's full-sized avatar
🏠
Working from home

Alex oivoodoo

🏠
Working from home
View GitHub Profile
@clins1994
clins1994 / unfollow-everyone-on-instagram.js
Last active December 19, 2021 18:04
Unfollow Everyone on Instagram
// HOW TO RUN IT ON GOOGLE CHROME
// 1. OPEN INSTAGRAM
// 2. OPEN LIST OF FOLLOWERS
// 3. OPEN DEVELOPER TOOLS
// 4. COPY EVERYTHING HERE CTRL + A
// 5. PASTE EVERYTHING IN DEVELOPER TOOLS CONSOLE
// 6. CLICK ENTER
// THERE YOU WILL SOON HAVE NO FRIENDS
const FOLLOWING_BUTTON_TEXT = 'フォロー中' // CHANGE THIS TO YOUR LANGUAGE
@ldenoue
ldenoue / gist:15310d7838733b7f26a746c560275d8c
Last active November 26, 2021 20:41
Screenshots and app previews for iOS apps on the App Store
/*
App Screenshots:
3 sizes are required for universal apps (iPhone and iPad)
- 5.5in screens: run simulator with "iPhone 6s+" and take screenshots (1242x2208) video=1080x1920
- 6.5in screens: run simulator with "iPhone XR" and take screenshots (1242x2688) video=886x1920
- 12.9in screens: run simulator with "iPad (2nd or 3d generation" and take screenshots (2048×2732) video=1200x1600
App Preview videos:
1 - Record simulator video: xcrun simctl io booted recordVideo in.mp4
@longcao
longcao / SparkCopyPostgres.scala
Last active December 26, 2023 14:47
COPY Spark DataFrame rows to PostgreSQL (via JDBC)
import java.io.InputStream
import org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils
import org.apache.spark.sql.{ DataFrame, Row }
import org.postgresql.copy.CopyManager
import org.postgresql.core.BaseConnection
val jdbcUrl = s"jdbc:postgresql://..." // db credentials elided
val connectionProperties = {
@ulve
ulve / remoteobserver.sh
Created February 2, 2016 20:19
Connect to remote phoenix node with observer
# On the phoenix node
# if production mode
MIX_ENV=prod PORT=4001 elixir --name phoenix@127.0.0.1 --cookie 123 --erl "-kernel inet_dist_listen_min 9001 inet_dist_listen_m 9001" -pa _build/prod/consolidated -S mix phoenix.server
# if debug mode
elixir --name phoenix@127.0.0.1 --cookie 123 --erl "-kernel inet_dist_listen_min 9001 inet_dist_listen_m 9001" -S mix phoenix.server
# On the observing node
# Terminal 1, start SSH tunnel
ssh -N -L 9001:localhost:9001 -L 4369:localhost:4369 pi@192.168.1.31
@bawbgale
bawbgale / gist:2bb60bec9154e6b49d8e
Last active August 29, 2015 14:22
Convert a set of flat JSON objects with consistent key order to CSV
cat part-00000 | jq -s -r '.[0] | to_entries | map(.key) | @csv' > all.csv | cat part-* | jq -s -r '.[] | to_entries | map(.value) | @csv' >> all.csv
@d6y
d6y / space.md
Last active November 16, 2016 11:41
Spacemacs: Notes made during install
@zph
zph / direnv.el
Last active March 30, 2017 16:29
(require 'cl-lib)
;; Depends on s.el
(defun direnv-data (dir)
;; TODO: use dir for folder or smart current-project-dir variable
(let ((cmd (concat "$SHELL -i -c '" "cd " dir " && direnv export bash'")))
(shell-command-to-string cmd)))
;;(direnv-data "~/src/direnv")
(defun commands-from-direnv (text)
@kevinelliott
kevinelliott / osx-10.10-setup.md
Last active December 1, 2023 08:21
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@pnc
pnc / observer.md
Last active September 9, 2023 23:32
Using Erlang observer/appmon remotely

Using OTP's observer (appmon replacement) remotely

$ ssh remote-host "epmd -names"
epmd: up and running on port 4369 with data:
name some_node at port 58769

Note the running on port for epmd itself and the port of the node you're interested in debugging. Reconnect to the remote host with these ports forwarded:

$ ssh -L 4369:localhost:4369 -L 58769:localhost:58769 remote-host