Skip to content

Instantly share code, notes, and snippets.

View edwardloveall's full-sized avatar
👈
there he is

Edward Loveall edwardloveall

👈
there he is
View GitHub Profile
@NapoleonWils0n
NapoleonWils0n / wget_download_website.sh
Created November 11, 2012 20:29
wget: download website
#!/bin/sh
# =========================
# = wget download website =
# =========================
wget --wait=20 --limit-rate=20K -r -p -U Mozilla http://www.somesite.com/
# quick and dirty
wget -r -p -U Mozilla http://somesite.com

What are you looking for in a mentor? What are your short-term and long-term goals? How do you best work with people? What level of experience with Ruby do you feel you have? What is it that you really want to be and do? What are you doing really well to help you get there? What could you be doing better in terms of getting there? How can I best help you achieve your goals? Have you had a mentor before, and if so, what was the experience like? What makes you happiest?

import Cocoa
extension BinaryFloatingPoint {
public var doubleValue: Double {
guard !(self is Double) else { return self as! Double }
guard !(self is Float) else { return Double(self as! Float) }
guard !(self is Float80) else { return Double(self as! Float80) }
guard !(self is CGFloat) else { return Double(self as! CGFloat) }
fatalError("Unsupported floating point type")
}
@marcboquet
marcboquet / Variables.plist
Created July 16, 2013 15:50
Soulver variables useful for iOS design. Based on ‏@marcedwards post: http://bjango.com/articles/soulver/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SKVariables</key>
<array>
<dict>
<key>enabled</key>
<true/>
<key>name</key>
@ttscoff
ttscoff / itunesicon.rb
Last active January 13, 2022 10:07
Retrieve a 512 x 512px icon for an iOS app
#!/usr/bin/ruby
# encoding: utf-8
#
# Updated 2017-10-25:
# - Defaults to large size (512)
# - If ImageMagick is installed:
# - rounds the corners (copped from @bradjasper, https://github.com/bradjasper/Download-iTunes-Icon/blob/master/itunesicon.rb)
# - replace original with rounded version, converting to png if necessary
#
# Retrieve an iOS app icon at the highest available resolution
@kddnewton
kddnewton / annoy_scanners_server.rb
Last active June 22, 2022 15:31
Annoy scanners
# I really don't like getting routing error notifications when scanners try to
# find vulnerabilities in our application. As such, this extends our routing
# to actually give a response, but it's likely not what they were looking for.
# If they're not using a headless browser, the `alert` is going to kill their
# productivity. If they are, they just might enjoy the youtube video anyway.
class AnnoyScannersServer
SCANNER_PATHS = %w[
/a2billing/admin/Public/index.php
/a2billing/common/javascript/misc.js
/a2billing/customer/templates/default/css/popup.css
GitHub changed the world of open-source.
In the beginning it brought together the disconnected programmers who always wanted to work on something with other like-minded people.
In the present it's no longer the foreground. Businesses and professionals connect and the profiles become a bragging ground.
The GH PR system is stretched to its limits. During the early days this was ok: PRs were few and far between. It worked.
I've changed, and so has GitHub. As I grow older I care more about my impact and personal data responsibility. I care about FOSS work being used for profit.
@lowjoel
lowjoel / with_temporary_table.rb
Last active March 1, 2023 21:39
RSpec test group helpers for creating tables.
# Test group helpers for creating tables.
# The latest version can be gound at https://gist.github.com/lowjoel/bda0d44b48aac2925079
module ActiveRecord::TemporaryTable; end
module ActiveRecord::TemporaryTable::TestGroupHelpers
# Defines a temporary table that is instantiated when needed, within a `with_temporary_table`
# block.
#
# @param [Symbol] table_name The name of the table to define.
# @param [Proc] proc The table definition, same as that of a block given to
# +ActiveRecord::Migration::create_table+
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@ChugunovRoman
ChugunovRoman / .gitlab-ci.yml
Created June 18, 2018 14:58
Deploy Electron app with gitlab ci
# https://<example.com>/<namespace>/<project>/-/jobs/artifacts/<tag>/download?job=pages
# https://<example.com>/<namespace>/<project>/-/jobs/artifacts/<tag>/raw/<path_to_file>?job=pages
# Where:
# example.com - domain name your gitlab server
# namespace - your name user on the gitlab
# project - your project
# tag - ref of current job.
# If job run on only by tags, than ref will be named as tag name
# If job run on only master, than ref will be named as "master", i.e.: https://<example.com>/<namespace>/<project>/-/jobs/artifacts/master/download?job=pages
# path_to_file - path to file relative from root workspace folder