Skip to content

Instantly share code, notes, and snippets.

View sente's full-sized avatar

Stuart Powers sente

View GitHub Profile
@paulirish
paulirish / how-to-view-source-of-chrome-extension.md
Last active April 23, 2025 10:52
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.

@matijagrcic
matijagrcic / Chrome Console.js
Last active March 15, 2016 01:12
Chrome Console
// It appears Netflix is following Facebook's lead
// https://news.ycombinator.com/item?id=7222129
// http://stackoverflow.com/questions/21692646/how-does-facebook-disable-the-browsers-integrated-developer-tools
// Chrome Team fixed this https://code.google.com/p/chromium/issues/detail?id=349993 rendering this technique invalid
(function() {
try {
var $_console$$ = console;
Object.defineProperty(window, "console", {
get: function() {
@SegFaultAX
SegFaultAX / nested_table.py
Last active August 22, 2021 02:40
Draw nested ascii tables in Python
from StringIO import StringIO
from operator import attrgetter
import textwrap
class Node(object):
def __init__(self, val=None, *children):
self.val = val
self.children = list(children)
test1 = Node("foo")
@seanrankin
seanrankin / active_github_repos.rb
Created November 3, 2014 21:18
A simple Ruby script that queries the github api for most active repos, and takes some arguments.
#!/usr/bin/env ruby
# A simple Ruby script that queries the github api for most active repos, and takes some arguments.
# Example => $ ./active_github_repos.rb --after 2004-01-01 --before 2014-01-31 --event tits --count 5
require "optparse"
options = {:after => nil, :before => nil, :event => nil, :count => nil}
parser = OptionParser.new do|opts|
@jordan-brough
jordan-brough / git-recent
Last active April 1, 2025 15:55
Git: Display a list of recently checked out branches/tags/commits
#!/usr/bin/env bash
# Source: https://gist.github.com/jordan-brough/48e2803c0ffa6dc2e0bd
# See also: https://stackoverflow.com/a/25095062/58876
# Download this script as "git-recent" (no extension), chmod it to be executable and put it in your
# path somewhere (e.g. /usr/bin). You can then use it via `git recent` from inside any git repo.
# Examples:
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
@labnol
labnol / google-apps-script.md
Last active April 23, 2025 21:46 — forked from junaidk/resources.md
How to Learn Google Apps Script

Learning Google Apps Script

Find the best resources for learning Google Apps Script, the glue that connects all Google Workspace services including Gmail, Google Drive, Calendar, Google Sheets, Forms, Maps, and more.

A good place to learn more about Google Apps Script is the official documentation available at developers.google.com. Here are other Apps Script resources that will help you get up to speed.

  1. Google Apps Script Code Samples by Amit Agarwal
  2. Google Apps Script Development - Create Google Apps Script projects locally inside VS Code - video tutorial
  3. Awesome Google Scripts by Amit Agarwal
  4. Google Developer Experts - Follow Apps Scr
@tylerwalts
tylerwalts / setupOSX.sh
Created March 5, 2014 19:56
This is a bash script to setup Mac OS X defaults on a new mac.
#!/bin/bash
#
# Set up OSX preferences
#
# Inspired by: https://github.com/mathiasbynens/dotfiles/blob/master/.osx
###########################################
# CONFIG
HOSTNAME="machiavellia"
TIMEZONE="America/Chicago" # 'systemsetup -listtimezones'