Skip to content

Instantly share code, notes, and snippets.

View ccurtin's full-sized avatar
🤙
makka thangs

Christopher James Curtin ccurtin

🤙
makka thangs
View GitHub Profile
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@DavidWells
DavidWells / add-wordpress-settings-page.php
Created January 28, 2013 05:59
WordPress :: Add Settings Page with All Fields
<?php
/*
Plugin Name: Homepage Settings for BigBang
Plugin URI: http://www.inboundnow.com/
Description: Adds additional functionality to the big bang theme.
Author: David Wells
Author URI: http://www.inboundnow.com
*/
// Specify Hooks/Filters
@ozh
ozh / github_oauth_token.md
Last active June 23, 2022 15:42
Get a Github OAuth token from the CLI with curl

At the command line:

curl -u ':USERNAME' -d '{"scopes":["public_repo"],"note":"Google Issues to GH"}' https://api.github.com/authorizations
curl -H "Authorization: bearer :TOKEN" https://api.github.com/users/:USERNAME -I

Replace :USERNAME with your Github username and :TOKEN with the oauth token you get from first curl

After that, the token will be listed in your Applications and you can revoke it from there

@plentz
plentz / nginx.conf
Last active June 27, 2024 21:05
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
.random-color {
border-top-color: "LightCoral";
border-right-color: #a44b58;
border-bottom-color: rgb(108, 188, 134);
border-left-color: rgb(24%, 88%, 5%);
outline-top-color: hsl(88, 69%, 69%);
outline-right-color: rgba(220, 71, 132, 0.69);
outline-bottom-color: rgba(79%, 47%, 14%, 0.37);
outline-left-color: hsla(111, 31%, 38%, 0.86);
}
@ccschmitz
ccschmitz / install-ssl-apache.md
Created April 19, 2015 19:48
How to install an SSL certificate on an Apache server.

Installing an SSL certificate on Apache

  1. Create a private key:
openssl genrsa 2048 > private-key.pem
  1. Create a Certificate Signing Request (CSR):
@Koze
Koze / WebViewGetUserAgent1.m
Last active May 23, 2022 09:49
Getting the user agent
// UIWebView
{
UIWebView *webView = [[UIWebView alloc] init];
[webView loadHTMLString:@"<html></html>" baseURL:nil];
NSString *appName = [webView stringByEvaluatingJavaScriptFromString:@"navigator.appName"];
NSLog(@"%@", appName);
// Netscape
NSString *userAgent = [webView stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"];
@tracend
tracend / .readme.md
Last active January 25, 2016 00:18
CSS particles

CSS Particles

Generate particles using CSS transitions

Examples

@scottopell
scottopell / fix_exfat_drive.md
Last active June 5, 2024 07:56
Fix corrupted exFAT disk macOS/OSX

exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.

Disk Utility is unable to repair this at first, but the fix is this:

  1. Use diskutil list to find the right drive id.
  2. You want the id under the IDENTIFIER column, it should look like disk1s1
  3. Run sudo fsck_exfat -d <id from above>. eg sudo fsck_exfat -d disk1s3
  4. -d is debug so you'll see all your files output as they're processed.
  5. Answer YES if it gives you the prompt Main boot region needs to be updated. Yes/No?