Nothing Special   »   [go: up one dir, main page]

Skip to content

Instantly share code, notes, and snippets.

View kiero's full-sized avatar

Konrad Kierys kiero

View GitHub Profile
disabled_rules:
- todo
opt_in_rules:
- force_unwrapping
- missing_docs
- switch_case_on_newline
- first_where
- attributes
- closure_end_indentation
- closure_spacing
@kiero
kiero / terminalcolors.py
Created February 5, 2017 17:00
Terminal colors
#!/usr/bin/env python
# Copyright (C) 2006 by Johannes Zellner, <johannes@zellner.org>
# modified by mac@calmar.ws to fit my output needs
# modified by crncosta@carloscosta.org to fit my output needs
import sys
import os
def echo(msg):
os.system('echo -n "' + str(msg) + '"')
@kiero
kiero / letsencrypt_generator.sh
Last active June 4, 2024 12:05
Let's Encrypt SSL generator for MyDevil.net hosting
#!/usr/bin/env bash
# Script for creating Let's Encrypt SSL certifcate.
# Used by cron job mostly.
# Set PATH variable for purposes of this script
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:login/bin
export ACME_HOME="${HOME}/acme-tiny"
# Create Acme Tiny files

Keybase proof

I hereby claim:

  • I am kiero on github.
  • I am kiero (https://keybase.io/kiero) on keybase.
  • I have a public key whose fingerprint is D3E2 CDBF 4205 67F2 7EEC 137B E38A 6E88 5C1E 50D3

To claim this, I am signing this object:

//
// UIColor+HexColor.h
//
// Created by Leah Culver on 11/9/10.
//
#import <UIKit/UIKit.h>
@interface UIColor (HexColor)
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (self.dealsVC == nil) {
DealsTableViewController *aDealVC = [[DealsTableViewController alloc] init];
self.dealsVC = aDealVC;
[aDealVC release];
}
City *city = [self.cities objectAtIndex:indexPath.row];
self.dealsVC.navigationItem.title = city.name;
$(function(){
navigator.geolocation.getCurrentPosition(function(pos){
$.post('/',{latitude: pos.coords.latitude, longitude: pos.coords.longitude}, function(data) { console.log(data); })
});
});
$(function(){
navigator.geolocation.getCurrentPosition(function(pos){
$.post('/',{latitude: pos.coords.latitude, longitude: pos.coords.longitude})
});
});
def index
if params[:search].present?
search = Spot.new(:address => params[:search], :name => params[:search])
search.geocode
@spots = Spot.near(search, 5, :order => :distance)
spotsForMap = @spots + [search]
title = params[:search]
elsif params[:latitude].present?
currentLocationSpot = Spot.new(:name => "Your position", :longitude => params[:longitude], :latitude => params[:latitude])
1.9.3p125 :020 > config['password'].to_yaml
=> "--- !binary |-\n OWY4NmQwODE4ODRjN2Q2NTlhMmZlYWEwYzU1YWQwMTVhM2JmNGYxYjJiMGI4\n MjJjZDE1ZDZjMTViMGYwMGEwOA==\n"
1.9.3p125 :021 > config['password']
=> "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
1.9.3p125 :022 >