Skip to content

Instantly share code, notes, and snippets.

@nicnocquee
nicnocquee / autoconnectwifiubuntu.md
Last active April 26, 2022 04:39
Script to autoconnect wifi in Ubuntu (linux)

Autoconnect wifi ubuntu

#!/bin/bash

wlan=`/sbin/ifconfig wlan0 | grep inet\ addr | wc -l` 
if [ $wlan -eq 0 ]; then
service network-manager restart 
else
echo WIFI IS UP

fi

@nicnocquee
nicnocquee / set_time_ubuntu.md
Created June 16, 2014 01:47
Set time in ubuntu command line

sudo date newdatetimestring

where newdatetimestring has to follow the format nnddhhmmyyyy.ss which is described below

nn is a two digit month, between 01 to 12

dd is a two digit day, between 01 and 31, with the regular rules for days according to month and year applying

hh is two digit hour, using the 24-hour period so it is between 00 and 23

@nicnocquee
nicnocquee / ubuntu_picuntu_wifi_connect.sh
Created June 12, 2014 08:43
Ubuntu / Picuntu connect to wifi
sudo iwconfig wlan0 essid ssid_name key s:ascii_13_chars [1]
sudo dhclient wlan0
@nicnocquee
nicnocquee / cards
Created June 3, 2014 14:21
“Add a method to Card that creates a full deck of cards, with one card of each combination of rank and suit.” Excerpt From: Apple Inc. “The Swift Programming Language.” iBooks. https://itun.es/jp/jEUH0.l
// Playground - noun: a place where people can play
import UIKit
enum Rank: Int {
case Ace = 1
case Two, Three, Four, Five, Six, Seven, Eigth, Nine, Ten
case Jack, Queen, King
func simpleDescription() -> String {
switch self {
@nicnocquee
nicnocquee / photos_to_video.sh
Last active August 29, 2015 14:01
Convert photos to video using ffmpeg. 2 photos per second.
ffmpeg -f image2 -r 2 -i %*.JPG -r 30 -s 1920x1080 -c:v libx264 out.mp4
@nicnocquee
nicnocquee / how to retina on non.txt
Created May 14, 2014 08:31
How to test retina web on non-retina display
You actually can using Firefox:
Go to "about:config"
Find "layout.css.devPixelsPerPx
Change it to your desired ratio (1 for normal, 2 for retina, etc. -1 seems to be Default.)
http://stackoverflow.com/questions/15551287/how-to-test-a-website-for-retina-on-windows-without-an-actual-retina-display
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>Font</key>
<data>
Base 64 String
Scared Of Failing? Ask Yourself These 6 Fear-Killing Questions WARREN BERGER, AUTHOR OF A MORE BEAUTIFUL QUESTION, COLLECTED THE PROVOCATIVE QUESTIONS TOP DESIGNERS, TECH INNOVATORS, AND ENTREPRENEURS ASK THEMSELVES TO SPARK CREATIVITY.
WRITTEN BY Warren Berger
[Editor’s note: The following is the first in a three-part series of posts adapted from Warren Berger’s new book, A More Beautiful Question (Bloomsbury), for which he spoke with top designers, tech innovators, entrepreneurs, and leading creative thinkers to explore the art (and innovative potential) of asking the right questions.]
***
Here’s a question: What would you attempt to do if you knew you could not fail?
If that question seems familiar, it should. One of the hallmarks of a powerful question is that it gets passed around, and among innovators I spoke with in the tech industry, this one has been making the rounds perhaps more than any other--quoted by everyone from Google’s Regina Dugan to Sebastian Thrun at Udacity and Airbnb co-founder Joe Ge
@nicnocquee
nicnocquee / high-coverting-checkout.md
Last active August 29, 2015 13:57
7 Proven Secrets of High-Converting Checkouts

http://www.copyblogger.com/high-converting-checkouts/

  1. High-converting checkouts make prices more palatable.
    • prices when they are listed without dollar signs
    • decreasing the size of the type in which you present a price can tweak the impression of the price amount — as if a price that looks small is small, and a price that looks big is big.
  2. High-converting checkouts include free shipping (not just % off)
    • "we’ll pay your shipping."
  3. High-converting checkouts make account creation feel less painful.
    • “Continue” button brought in 45 percent more sales than a “Register” button.
  • Modifying the language on the button to remove a friction-y sense of doing work
//
// main.m
//
// Created by Nico Prananta on 10/30/13.
// Copyright (c) 2013. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"