Skip to content

Instantly share code, notes, and snippets.

View DerekK19's full-sized avatar

Derek Knight DerekK19

View GitHub Profile
@DerekK19
DerekK19 / gist:6325859
Created August 24, 2013 03:18
Add existing repo to Github
# Create a repo on github. Assume it's called "MyRepo" and your git username is "gitUser"
# set up the current foder to be a git repo
git init
git add .
git commit -m 'Initial commit'
git remote add origin https://github.com/gitUser/MyRepo.git
git pull origin master
git push origin master
@DiogoAndre
DiogoAndre / ping.rb
Last active January 3, 2024 09:08
Simple ICMP Ping script in Ruby. Using the Net-Ping gem https://github.com/djberg96/net-ping
require 'net/ping'
@icmp = Net::Ping::ICMP.new('142.40.81.34')
rtary = []
pingfails = 0
repeat = 5
puts 'starting to ping'
(1..repeat).each do
if @icmp.ping
@ngs
ngs / Dictionary.js
Created July 26, 2012 07:53
Script to convert JSON to Objective-C literal
var Dictionary;
if (!Dictionary) {
Dictionary = {};
}
(function () {
'use strict';
function f(n) {
// Format integers to have at least two digits.