Notes and Exercises from Chapter 10 of Haskell Book
[1, 2, 3] ++ undefined
:
// ==UserScript== | |
// @name Unstable Warner | |
// @namespace http://tampermonkey.net/ | |
// @version 0.5 | |
// @description Warn before merging unstable pull requests on GitHub | |
// @author Terence Tuhinanshu @rajadain | |
// @match https://github.com/**/pull/* | |
// @grant none | |
// ==/UserScript== |
from __future__ import print_function | |
import time | |
import requests | |
class bcolors: | |
HEADER = '\033[95m' | |
OKBLUE = '\033[94m' | |
OKGREEN = '\033[92m' |
module Main where | |
import Control.Monad (forever) | |
import Data.Char (toLower) | |
import Data.Maybe (isJust) | |
import Data.List (intersperse, nub) | |
import System.Exit (exitSuccess) | |
import System.Random (randomRIO) | |
import System.IO |
-- 11-exercise-phone.hs | |
module ExercisePhone where | |
import Data.Char | |
import Data.List | |
import Data.Maybe | |
type Key = Char | |
type Presses = Int |
[1, 2, 3] ++ undefined
:
$ ./convert.sh ppt_colorbar.png
+ gm convert ppt_colorbar.png txt:-
<?php | |
for ($i = 97; $i < 122; $i++) { | |
for ($j = 0; $j < 100; $j++) { | |
$usn = chr($i) . strval($j); | |
$url="http://api.twitter.com/1/users/show.json?screen_name=".$usn; | |
$json = file_get_contents($url,0,null,null); | |
if ($http_response_header[0] == "HTTP/1.1 404 Not Found ") | |
echo "<p style='color:red'>$usn is available.</p>"; | |
else | |
echo "<p style='color:grey'>$usn is not available.</p> "; |