Skip to content

Instantly share code, notes, and snippets.

View Asparagirl's full-sized avatar

Brooke Schreier Ganz Asparagirl

  • Mill Valley, California
View GitHub Profile
@eserdinyo
eserdinyo / useEmitter.ts
Created November 13, 2023 14:57
Built in eventbus composable for nuxt 3
// composables/useEmitter.ts
export default function () {
const hooks = useNuxtApp().hooks;
return {
emit: hooks.callHook,
on: hooks.hook,
}
}
@DominikAngerer
DominikAngerer / nuxt.config.generate.js
Last active August 11, 2019 17:35
Nuxt Generate function to create pages according to Storybloks Links API
// const axios = require('axios')
// Using Links API
generate: {
routes: function (callback) {
const token = `YOUR_TOKEN`
const version = 'published'
let cache_version = 0
@kentbrew
kentbrew / finding_twitter_user_id.md
Last active March 24, 2024 16:42
Finding Twitter User IDs

Finding Twitter User IDs

User accounts on Twitter are commonly identified by screen name, which may be changed by operators when they take over an account, or have been sitting on an old account for a long time and want to transition it into malicious use.

User IDs, however, are permanent. There are several services out there that will try to find them for you but it seems like a bad idea to me, since you're alerting them to the fact that there's something interesting about this account. There's also plenty of bad advice that uses many long-since-abandoned Twitter API endpoints.

As of this writing (2018-02-18) you can view source and search for /profile_banners/, which will show something like this:

.enhanced-mini-profile .mini-profile .profile-summary {
@hannahwhy
hannahwhy / gist:9c2a0f0ffa7a8db5075e58f711b5d3f0
Last active November 4, 2016 18:38
Switching pipelines to archivebot2 - https://git.io/vPFVm
# INSTRUCTIONS
First, stop your current pipelines. For new pipelines:
1. Install autossh. (Debian: apt install autossh)
archivebot2 is running on a DigitalOcean CoreOS droplet.
On DigitalOcean, CoreOS droplets will restart to apply OS updates.
To deal with these restarts, you'll need some way to bring the SSH->Redis
tunnel back up automatically. autossh is pretty good at that.
@dannguyen
dannguyen / faa-333-pdf-gathering.md
Last active June 19, 2021 13:18
Using wget + grep to explore inconveniently organized federal data (FAA Section 333 Exemptions)

if !database: wget + grep

The Federal Aviation Administration is posting PDFs of the Section 333 exemptions that it grants, i.e. the exemptions for operators who want to fly drones commercially before the FAA finishes its rulemaking. A journalist wanted to look for exemptions granted to operators in a given U.S. state. But the FAA doesn't appear to have an easy-to-read data file to use and doesn't otherwise list exemptions by location of operator.

However, since their exemptions page is just one giant HTML table for listing the PDFs, we can just use wget to fetch all the PDFs, run pdftotext on each file, and then [grep](https://medium.com/@rualthanzauva/grep-was-a-private-command-of-m

@jimmyz
jimmyz / gist:7ed286ba1c1942c018e5
Created February 4, 2015 00:11
List of Family History Related Open Source Projects
RootsDev
https://github.com/rootsdev/roots-search (Chrome Plug-in / JavaScript)
https://github.com/rootsdev/familysearch-javascript-sdk
https://github.com/rootsdev/gofamilysearch (Go FamilySearch SDK)
https://github.com/rootsdev/polygenea (Java and D, Collaborative Research-centric Data Model)
https://github.com/rootsdev/familysearch-reference-client (JavaScript/Angular, Tree Client for FamilySearch API)
https://github.com/rootsdev/genealogy-search (Chrome Extension)
https://github.com/rootsdev/people-inspector (Chrome Extension - historical-data.org microdata reader)
@belsrc
belsrc / gist:672b75d1f89a9a5c192c
Last active April 15, 2023 15:13
Simple Vue.js filters that I usually need
/**
* Changes value to past tense.
* Simple filter does not support irregular verbs such as eat-ate, fly-flew, etc.
* http://jsfiddle.net/bryan_k/0xczme2r/
*
* @param {String} value The value string.
*/
Vue.filter('past-tense', function(value) {
// Slightly follows http://www.oxforddictionaries.com/us/words/verb-tenses-adding-ed-and-ing
var vowels = ['a', 'e', 'i', 'o', 'u'];

Stealing WiFi

/etc/hosts

This will let you access any google owned site. This includes: youtube, google cache, google translate, google search, gmail, google news, etc.

  • Install the HTTPS Everywhere extension
  • Add these rules to your /etc/hosts file
@tkh44
tkh44 / FileController.js
Last active March 10, 2020 09:04
Simple file upload for sails.js
module.exports = {
get: function (req, res) {
res.sendfile(req.path.substr(1));
},
_config: {
rest: false,
shortcuts: false
}
};
@coderjo
coderjo / README
Last active December 29, 2015 12:29
ArchiveTeam project worker EC2 user-data script.
This is a user-data script for starting up ec2 instances to run an ArchiveTeam project downloader.
steps:
1. save the file to your drive.
2. change where it says YOURNICKHERE to the name you want to show up on the tracker.
3. pick the 32-bit Debian Wheezy 7.2 AMI for the region you plan to use.
4. put the ENTIRE contents of your file as the user-data field.
- If you are using the command-line ec2 tools, you can say --user-data-file YOURFILENAME
- If you are using the web console, on page 3 ("Configure Instance"), expand the "Advanced Details" section and either paste the contents into the "user data" box, or pick "as file" then click browse to select your file.
5. finish setting up your instance. Don't forget to configure a security group to allow you SSH access.