Skip to content

Instantly share code, notes, and snippets.

Esfand esfand

Block or report user

Report or block esfand

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Iristyle
Iristyle / encoding.md
Last active Aug 16, 2019
Encoding in Puppet
View encoding.md

Basic encoding info

  • ASCII is 0 - 7F (128 total characters) - ASCII is a subset of UTF-8
  • UTF-8 - variable width 1 to 4 bytes
Numberof bytes Bits forcode point Firstcode point Lastcode point Byte 1 Byte 2 Byte 3 Byte 4
1 7 U+0000 U+007F 0xxxxxxx      
2 11 U+0080 U+07FF 110xxxxx 10xxxxxx    
3 16 U+0800 U+FFFF 1110xxxx 10xxxxxx 10xxxxxx  
@stanislaw
stanislaw / utf8.c
Created Nov 19, 2015
Some C functions to work with UTF-8 string : you can check if a string is valid UTF-8, get the length of a UTF-8 string and replace things in a UTF-8 string. All `char *` arguments must be regular, null-byte terminated, C strings. I've tried to optimize the best I could. I'd be grateful for any suggestions or improvements. Please note I have onl…
View utf8.c
//
// utf8.c
// training
//
// Created by Conrad Kleinespel on 5/27/13.
// Copyright (c) 2013 Conrad Kleinespel. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
@sivaprasadreddy
sivaprasadreddy / angularjs-filters.html
Created Sep 15, 2014
AngularJS filters final HTML
View angularjs-filters.html
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>My AngularJS App</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
@ssmiech
ssmiech / invisibleText.java
Last active Aug 29, 2015
How to read text from hidden divs
View invisibleText.java
package selenium;
import java.sql.Driver;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.Wait;
View DocGist Example.adoc

DocGist Example

DocGist is a tool that renders AsciiDoc documents fetched from GitHub gists or other sources. The rendering is performed in the browser using the asciidoctor.js library. The original use case for this was http://gist.neo4j.org/ which has additional features to create examples for the Neo4j graph database.

How To Use

@khris
khris / OAuth1.java
Created Jan 18, 2014
Alternative OAuth 1 implements for Twitter's hbc. It's compatible with joauth 6.0.+ so independent from Scala.
View OAuth1.java
/**
* Original: https://github.com/twitter/hbc/blob/master/hbc-core/src/main/java/com/twitter/hbc/httpclient/auth/OAuth1.java
*
* It is compatible with scala-less joauth 6.0.+, but hbc is not
* compatible with Android. #EpicFail
*
* Licensed under the Apache License, Version 2.0 (the "License");
**/
/**
@danharper
danharper / background.js
Last active Sep 15, 2019
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
View background.js
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
View .gitignore
target/
*/src/main/*/META-INF/
.access_token
.result
.classpath
.project
.DS_Store
.settings/
*.iml
*.iws
@rudolfolah
rudolfolah / injector.js
Last active Dec 29, 2015
AngularJS's injector.js
View injector.js
var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m;
var FN_ARG_SPLIT = /,/;
var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/;
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
var $injectorMinErr = minErr('$injector');
function annotate(fn) {
var $inject,
fnText,
argDecl,
@esfand
esfand / 0-UAA-Configuration.md
Last active Dec 23, 2015
UAA Security Features and Configuration
View 0-UAA-Configuration.md

UAA Features and Configuration

It is the responsibility of a Resource Server to extract information about the user and client application from the access token and make an access decision based on that information.

This guide will help authors of resource Servers and maintainers of client and user account data to understand the range of information available and the kinds of decisions that can be taken.

You can’t perform that action at this time.