This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net; | |
using System.IO; | |
public class YahooSearch | |
{ | |
public string Autocomplete (string term) | |
{ | |
string url = "http://sugg.search.yahoo.com/gossip-us-fp/" + "?output=yjsonp&nresults=10&version=&command=" + term + "&queryfirst=2"; | |
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net; | |
using System.IO; | |
public class Sample-Site | |
{ | |
public string Function1 (string topic,string variableParamValue,string subtopic) | |
{ | |
string url = "http://www.samplesite.com/@topic@/@subtopic@" + "?staticParam=value1&variableParam=" + variableParamValue + ""; | |
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style type="text/css"> | |
.s:not(:empty)+.s:not(:empty):before { | |
content: " / "; | |
} | |
</style> | |
</head> | |
<body> | |
<div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For all those forgetful people.... | |
alias where='echo "You probably mean \"whereis\"!"; whereis' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@contrast-level: 85%; | |
.auto-colorize(@text-color) { | |
color: @text-color; | |
// pick the color with the most contrast to our text color | |
// _should_ at least be readable with light colors | |
background-color: contrast( | |
@text-color, | |
shade(@text-color, @contrast-level), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Using color codes: | |
`0message` | |
`1message` | |
`amessage` | |
`Amessage` | |
The game matches the following regex: | |
`(?:([0-9])|([a-z])|([A-Z]))(.+?)` | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
with all the esoteric functions PHP has, you would think they would also have something like this: | |
*/ | |
function ifset($array, $key, $ifnotset = null) { | |
if(isset($array[$key])) return $array[$key]; | |
return $ifnotset; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function decygwin($path) { | |
return preg_replace('/\/cygdrive\/(\D)\//', '$1:/', $path); | |
} | |
// use native symlinks, because non-native cygwin symlinks are not "directories": `is_dir('cygwin-symlink') == false` | |
set('env_vars', 'CYGWIN="winsymlinks:nativestrict"'); | |
// cygwin release path fix | |
// replaces the cygwin release path (/cygdrive/c/) with the windows release path (C:/) | |
// increases compatibility with things like non-cygwin PHP for composer installs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FILE="client_key" | |
OUTPUT_FILE="client_key-cert.pub" | |
echo "Generating new key..." | |
ssh-keygen -t rsa -f $FILE -N '' | |
echo "Getting client key signed by Vault..." | |
cat $FILE.pub | vault write ssh-client-signer/sign/clientrole public_key=- | grep "signed_key" | cut -f 2 > $OUTPUT_FILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Automatic Tab Closer | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description No more tab hogging ;) | |
// @author AlbinoDrought | |
// @match *://www.w3schools.com/* | |
// @match *://php.net/* | |
// @match *://www.google.ca/* | |
// @grant window.close |
OlderNewer