Skip to content

Instantly share code, notes, and snippets.

View jakenology's full-sized avatar
🏠
Working from home

Jakenology jakenology

🏠
Working from home
  • Midwest, USA
View GitHub Profile
@jazzido
jazzido / index.html
Last active January 10, 2022 03:52
Glowing text effect with CSS3
<html>
<head>
<style type="text/css">
.glow {
-webkit-animation-duration: 1s;
-webkit-animation-name: glow;
-webkit-animation-direction: alternate;
-webkit-animation-iteration-count: infinite;
animation-duration: 1s;
animation-name: glow;
@james2doyle
james2doyle / getBrowser.php
Last active February 20, 2024 06:06
a PHP function to sniff the user agent of the browser and return a nice object with all the information
<?php
// http://www.php.net/manual/en/function.get-browser.php#101125
function getBrowser() {
$u_agent = $_SERVER['HTTP_USER_AGENT'];
$bname = 'Unknown';
$platform = 'Unknown';
$version= "";
// First get the platform?
if (preg_match('/linux/i', $u_agent)) {
@bedartha
bedartha / fetchrunnningapps.py
Last active June 16, 2019 05:16
Fetch running apps and their icons on OS X using PyObjC
from AppKit import NSWorkspace
sharedWorkspace = NSWorkspace.sharedWorkspace()
launchedApps = sharedWorkspace.launchedApplications()
for liveApp in launchedApps:
appName = str(liveApp.allValues()[-1]
appPath = str(liveApp.allValues()[0])
appIcon = sharedWorkspace.iconForFile_(appPath)
icoPath = './' + appName + '.png'
appIcon.TIFFRepresentation().writeToFile_atomically_(icoPath, False)
@ssstonebraker
ssstonebraker / sed cheatsheet
Created August 2, 2013 14:06 — forked from un33k/sed cheatsheet
Sed Cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@techstiff
techstiff / gist:9487304
Created March 11, 2014 14:48
Check Domain Availability with Python
import urllib2,cookielib
import re
def checkDomain(domain):
site='http://www.checkdomain.com/cgi-bin/checkdomain.pl?domain=' + domain
hdr = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
'Accept-Encoding': 'none',
'Accept-Language': 'en-US,en;q=0.8',
@snarf1974
snarf1974 / gist:11198020
Created April 22, 2014 23:36
HTML Template: Client-side redirect (meta refresh)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="0;URL=../new-page.htm" />
<title>Redirect to... title of new-page</title>
</head>
<body>
<h1>Re-directing...</h1>
<p>You are being re-directed, if nothing happens, please <a href="../new-page.htm">follow this link</a></p>
@drmalex07
drmalex07 / README-create-debian-startup-script.md
Last active September 15, 2024 02:28
An example of how to create a init.d script in Debian, using dependency booting. #debian #init.d #lsb-script #startup-script
@shawnsi
shawnsi / aws-ip-ranges.py
Created December 16, 2014 20:43
AWS IP Range Parsing
#!/usr/bin/env python
from __future__ import print_function
import requests
def merge_prefixes(payload):
"""
Converts the AWS services JSON payload into a list of tuples.
Arguments:
@PurpleBooth
PurpleBooth / README-Template.md
Last active August 2, 2026 18:31
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@amatellanes
amatellanes / remove_app_launchpad_yosemite.sh
Created September 19, 2015 06:52
Remove apps from Launchpad in Mac OS X 10.10 (Yosemite)
sqlite3 $(sudo find /private/var/folders -name com.apple.dock.launchpad)/db/db "DELETE FROM apps WHERE title='APPNAME';" && killall Dock