Skip to content

Instantly share code, notes, and snippets.

View gokhandemirhan's full-sized avatar

Gokhan Demirhan gokhandemirhan

View GitHub Profile
@emir
emir / challenge.md
Last active November 7, 2016 12:07
Medium Challenge (Kasım)
@paulirish
paulirish / how-to-view-source-of-chrome-extension.md
Last active May 8, 2024 20:31
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

#!/bin/sh
exec <"$0" || exit; read v; read v; exec /usr/bin/osascript - "$@"; exit
-- the above is some shell trickery that lets us write the rest of
-- the file in plain applescript
-- Usage:
-- For a simple reload and nothing else:
-- # sh reload_chrome.sh
-- For a reload with activating a different app after (iTerm in this case):
-- # sh reload_chrome.sh iTerm
@bradwestfall
bradwestfall / gist:f5a010e96fb0c4d18556
Last active November 20, 2022 14:40
Pull Instagram Images via JavaScript
@scrubmx
scrubmx / HTML5Validation.html
Last active February 19, 2021 09:32
Change the language of error message for html5 required fields.
/*
|-----------------------------------------------------------------------
| With HTML
|-----------------------------------------------------------------------
*/
<input
type="number"
id="userProvidedHeight"
min="211"
@CrookedNumber
CrookedNumber / gist:8856939
Last active September 12, 2022 17:33
How to create Trello Cards from the Command Line (with a ~10 minute set-up)
  1. This is quick and dirty and not terribly maintainable. But it's very useful for creating quick cards from the terminal. Requires familiarity with Trello and a basic understanding of bash.
  2. Log-in to Trello.
  3. Go to: https://trello.com/1/appKey/generate
  4. Make note of your key. Replace any mention of YourTrelloKey with this hash.
  5. Create a token. Go to https://trello.com/1/authorize?key=YourTrelloKey&name=SimpleBASHScript&expiration=never&response_type=token&scope=read,write in your browser and follow directions.
  6. Make note of the token. Replace any mention of YourTrelloToken with this looong hash.
  7. Pick a reasonable number of the most popular boards you use. Grab the URLs of those boards. At the same time, think of short, one-word, easy-to-remember names for each board (e.g., work, homeprojects, wedding).
  8. Grab the board IDs of the boards you chose. It'll be the ~8 character hash-like string in the URL. E.g., for https://trello.com/b/aWsGTrsD/work the ID is aWsGTrsD
  9. One by one, plug thos
@lucasmotta
lucasmotta / refresh_chrome_tab.sh
Last active July 28, 2017 10:18 — forked from mayoff/gist:1138816
Find and Refresh a given url on Google Chrome using a shell script (and AppleScript).
# Trick to execute AppleScript directly on a shell script.
# The code below will look for the given url to refresh the tab
/usr/bin/osascript << EOF
tell application "Google Chrome"
activate
set theUrl to "http://your-site-url.com"
if (count every window) = 0 then
make new window
end if
@vojto
vojto / ReloadChrome.scpt
Created October 30, 2012 18:09
Script to refresh Chrome remote Chrome browser
tell application "Google Chrome"
reload of active tab of window 1
end tell
@JamieMason
JamieMason / watch.rb
Created September 26, 2012 08:16
Watch a folder for changes to files, then reload Chrome
#!/usr/bin/env ruby
require 'tempfile'
require 'fileutils'
# Signals
trap("SIGINT") { exit }
# Setup
TARGET_FOLDER = ARGV[0]
TARGET_URL = ARGV[1]
@simenbrekken
simenbrekken / README.md
Created March 8, 2012 06:39
Super simple Backbone + Express + MongoDB REST backend application

Requirements:

If you're on OSX you're probably best off using Homebrew to install this stuff:

$ brew install node mongodb

Usage: