Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Christopher Prince crspybits

🏠
Working from home
View GitHub Profile
@ticean
ticean / drop-mysql-tables.sh
Created May 10, 2011
Shell script to drop all tables from MySQL.
View drop-mysql-tables.sh
#!/bin/bash
# A shell script to delete / drop all tables from MySQL database.
# Usage: ./script user password dbnane
# Usage: ./script user password dbnane server-ip
# Usage: ./script user password dbnane mysql.nixcraft.in
# -------------------------------------------------------------------------
# Copyright (c) 2008 nixCraft project <http://www.cyberciti.biz/fb/>
# This script is licensed under GNU GPL version 2.0 or above
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
View states_hash.json
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
@dearaujoj
dearaujoj / remove_git_tag
Created Oct 22, 2013
git remove tag locally and remote
View remove_git_tag
git tag -d TagName && git push origin :refs/tags/TagName
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active Aug 11, 2020
how to delete a git tag locally and remote
View git-tag-delete-local-and-remote.sh
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active Aug 7, 2020
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)
View letsencrypt_2020.md

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@hishma
hishma / CLLocation+Encodable.swift
Created Jan 16, 2019
CoreLocation and Codable
View CLLocation+Encodable.swift
extension CLLocation: Encodable {
public enum CodingKeys: String, CodingKey {
case latitude
case longitude
case altitude
case horizontalAccuracy
case verticalAccuracy
case speed
case course
case timestamp
You can’t perform that action at this time.