Skip to content

Instantly share code, notes, and snippets.

View 1stvamp's full-sized avatar
:shipit:

Wes Mason 1stvamp

:shipit:
View GitHub Profile
@jordansissel
jordansissel / zoom.md
Last active March 16, 2023 00:48
Zoom on Linux notes

In a zoom?

xdotool search --name "Zoom Meeting ID:"

This will exit non-zero if no meeting matching this name is found. "Zoom Meeting ID:"

This window exists regardless of sharing or not sharing, in my tests.

@dimaryaz
dimaryaz / dropbox_ext4.c
Created August 15, 2018 07:28
Dropbox ext4 hack
/*
* dropbox_ext4.c
*
* Compile like this:
* gcc -shared -fPIC -ldl -o libdropbox_ext4.so dropbox_ext4.c
*
* Run Dropbox like this:
* LD_PRELOAD=./libdropbox_ext4.so ~/.dropbox-dist/dropboxd
*/
import github3
# example code:
github = Github(
token='token',
repo_name='some_repo',
)
github.stage('articles/some_article.md', 'This is some new content')
github.publish('commit message')
#!/bin/bash
# if we are testing a PR, merge it with the latest master branch before testing
# this ensures that all tests pass with the latest changes in master.
set -eu -o pipefail
PR_NUMBER=${CI_PULL_REQUEST//*pull\//}
err=0
if [ -z "$PR_NUMBER" ]; then
#!/bin/bash
#
# This script will create xenial and trusty lxd images that will be used by the
# lxd provider in juju 2.1+ It is for use with the lxd provider for local
# development and preinstalls a common set of production packages.
#
# This is important, as between them, basenode and layer-basic install ~111
# packages, before we even get to any packages installed by your charm.
#
# It also installs some helpful development tools, and pre-downloads some
#!/bin/bash
set -eu
_UID=$(id -u)
GID=$(id -g)
# give lxd permission to map your user/group id through
grep root:$_UID:1 /etc/subuid -qs || sudo usermod --add-subuids ${_UID}-${_UID} --add-subgids ${GID}-${GID} root
# set up a separate key to make sure we can log in automatically via ssh
# with $HOME mounted
@niedbalski
niedbalski / mongo.sh
Created February 10, 2015 20:20
Connect to Juju Mongodb
$ juju ssh 0
machine-0# sudo apt-get install mongodb-clients
machine-0# mongo --ssl -u admin -p $(grep oldpassword /var/lib/juju/agents/machine-0/agent.conf | awk -e '{print $2}') localhost:37017/admin
MongoDB shell version: 2.4.9
connecting to: localhost:37017/admin
juju:PRIMARY> db = db.getSiblingDB("juju")
juju
@caius
caius / gist:ef463ad94312988d7381
Created December 2, 2014 12:14
Table flipping exceptions in Ruby
A = Class.new(Exception)
# => A
A_(╯°□°)╯︵┻━┻ = Class.new(Exception)
# => A_(╯°□°)╯︵┻━┻
A_(╯°□°)╯︵┻━┻.new(Marshal.load("\x04\bI\"\flbs\xCA\x8E\xC9\xAF\x06:\x06ET"))
# => #<A_(╯°□°)╯︵┻━┻: lbsʎɯ>
anonymous
anonymous / mailFilters.xml
Created November 13, 2014 18:09
<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'>
<title>Mail Filters</title>
<id>tag:mail.google.com,2008:filters:1379887346141,1380221719440,1382518874213,1382518894571,1382977508777,1382977521425,1383153631839,1385167025659,1394822320113,1394825526150,1395186917683,1404335447263,1414438371526,1414438407375,1414438455629,1414438507193,1414438537486</id>
<updated>2014-11-13T18:03:49Z</updated>
<author>
<name>Your Name</name>
<email>your.name@canonical.com</email>
</author>
<entry>
<category term='filter'></category>
@jamestait
jamestait / applist.py
Last active January 30, 2017 13:27 — forked from rschroll/applist.py
A script to browse the Ubuntu Touch apps
#!/usr/bin/env python
# A basic Python script to let you browse the apps available in the
# Ubuntu Touch App store. Run it and your web browser should open.
#
# Copyright 2014 Robert Schroll
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights