text:
## Overview

An ActionBar is located at the top of an activity and it can display any number of status or navigation related elements such as title, icon, buttons, or arbitrary action-related views.

This is typically used for displaying the title of the application and providing a primary navigation for the app. The ActionBar can contain primary action buttons as well as a drawer toggle icon for displaying the navigation drawer.

**Note** that we will be using the support library and `AppCompatActivity` for these examples since the library provides maximum compatibility with pre-3.0 Android versions. The APIs and usage are the same with the standard ActionBar just with small changes to the imported classes and class names.  If you are not currently using the support library, check out this [[migration guide|Migrating to the AppCompat Library]].

## Usage

In the [[Defining ActionBar|Defining-The-ActionBar#actionbar-basics]] cliffnotes we looked at the basics of adding items to the ActionBar and handling clicks. In this section, we take a look at how to use `AppCompatActivity` to support all Android versions and also at several powerful and extensible ActionBar features:

 * Using the split action bar to have a top and bottom menu
 * Adding ActionView (`app:action_layout`) and `SearchView` widgets
 * Configuring icon order within ActionBar
 * Using `ActionProvider` and `ShareActionProvider` to enable richer functions
 * Configuring Home Icon to navigate "Up"
 * Inflating menu icons from fragments within the ActionBar

### Setting up AppCompatActivity

In order to ensure that the ActionBar works on all Android versions, we are going to use [AppCompatActivity](https://developer.android.com/reference/android/support/v7/app/AppCompatActivity.html) to setup our support ActionBar.  Follow the [[AppCompat setup guide|Migrating-to-the-AppCompat-Library]] to make sure you're including the library.

Once the library has been added, be sure to sync your project with the gradle file (`Tools => Android => Sync Project with Gradle Files`) and make sure any applicable activities are now extending from `AppCompatActivity` in order to enable
the compatibility fragments and action bar:

```java
public class MainActivity extends AppCompatActivity {
   // ...
}
```

and change the parent theme to a support compatible theme in `values/styles.xml` such as `Theme.AppCompat.Light.DarkActionBar`:

```xml
<resources>
    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
    </style>
</resources>
```

Now the support ActionBar is configured and ready to be used. However, one should note that the `res/menu` xml files now need to use an `app:` prefix for `showAsAction` as shown below:

```xml
<menu xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto">
    <item
        android:id="@+id/action_refresh"
        android:title="@string/action_refresh"
        android:icon="@drawable/ic_action_refresh"
        app:showAsAction="ifRoom" />
</menu>
```

Note the use of `app:showAsAction` instead of `android:showAsAction` in the case of adding support action bar items.

### Populating Action Buttons

The action bar provides users access to the most important action items relating to the app's current context. Those that appear directly in the action bar with an icon and/or text are known as action buttons.

For the support ActionBar, just change `onCreateOptionsMenu` to use the compatibility inflater:

```java
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.menu_main, menu);
    return true;
}
```

See the [[Defining the ActionBar|Defining-The-ActionBar#actionbar-basics]] cliffnotes
for the basic details of adding items and handling clicks.

### Configuring ActionBar Icon Order

You can control the order of items within the ActionBar using `orderinCategory` where each menu item has an integer specified and lower integers are displayed with a higher priority:

```xml
<item
   android:id="@+id/menu_ordinary"
   android:orderInCategory="200"
   app:showAsAction="ifRoom"
   android:title="Ordinary" />

<item
   android:id="@+id/menu_important"
   android:orderInCategory="20"
   app:showAsAction="ifRoom"
   android:title="Important" />
```

This can be useful to be explicit with the desired order based on importance of actions.

### Custom ActionBar Styles

We can configure the ActionBar styles and properties by creating our own ActionBar theme styles. For example, we could add the following to `res/values/styles.xml`:

```xml
<resources>

    <!-- Define your colors in `res/values/colors.xml` -->
    <color name="simple_yellow">#ECD078</color>
    <color name="primary_blue">#53777A</color>

    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <item name="android:actionBarStyle">@style/MyActionBar</item>
        <item name="android:actionBarTabTextStyle">@style/MyActionBarTabText</item>

        <!-- Support library compatibility -->
        <item name="actionBarStyle">@style/MyActionBar</item>
        <item name="actionBarTabTextStyle">@style/MyActionBarTabText</item>
    </style>

    <style name="MyActionBar"<EMAIL_ADDRESS>        <item name="android:background">@color/simple_yellow</item>
        <item<EMAIL_ADDRESS>
        <!-- Support library compatibility -->
        <item name="background">@color/simple_yellow</item>
        <item<EMAIL_ADDRESS>    </style>

    <style name="MyActionBar.TitleTextStyle"
<EMAIL_ADDRESS>        <item name="android:textColor">@color/primary_blue</item>
    </style>

    <style name="MyActionBarTabText"<EMAIL_ADDRESS>        <item name="android:textColor">@color/primary_blue</item>
    </style>

</resources>
```

Now verify the theme for the application or activity within the `AndroidManifest.xml`:

```xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.codepath.example.servicesdemo"
    ...>
    <application
        ...
        android:theme="@style/AppTheme" >
</manifest>
```

Now your properties and styles will take affect within the ActionBar. This results in the following:

See the [actionbar styling demo code](https://github.com/codepath/android-actionbar-style-demo) for a working example. If you want to style the tabs for the ActionBar, see our [[Tabs Styling Cliffnotes|ActionBar-Tabs-with-Fragments#styling-tabs]].

Check out this [styling the ActionBar](http://developer.android.com/guide/topics/ui/actionbar.html#Style) section for more details. For an easier way to skin the ActionBar, check out the [ActionBar Style Generator](http://jgilfelt.github.com/android-actionbarstylegenerator) tool for easy styling.

### Custom ActionBar Layout

In certain cases, you might want to change the styling of the ActionBar title more significantly. For example, you may want to tweak the icon, change the size of the title, tweak the color, or center the text. In order to achieve this, you can replace the default title with your own custom XML view. First, define your custom ActionBar XML in `res/layout/actionbar_title.xml`:

```xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:orientation="vertical" >
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:text="@string/app_title"
        android:textColor="#ffffff"
        android:id="@+id/mytext"
        android:textSize="18dp" />
</LinearLayout>
```

Now we've defined the XML layout desired and we need to load this custom XML file and replace the ActionBar title with our customized XML inside the Activity by calling [setCustomView](http://developer.android.com/reference/android/app/ActionBar.html#setCustomView\(int\)):

```java
import android.support.v7.app.ActionBar;
// in Activity#onCreate
getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
getSupportActionBar().setCustomView(R.layout.actionbar_title);
```

At this point, we now have replaced the default ActionBar with our preferred layout and have complete control over it's appearance. The above code results in:

If you want to **include the app icon with the custom layout** you need to append `DISPLAY_SHOW_HOME` as well:

```java
getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_SHOW_HOME);
```

Note you can **still define an `onCreateOptionsMenu` method** in your Activity to define the action buttons.  This custom view will then share space with the action buttons, which normally are placed to the right side of the Action Bar.

### Adding ActionView Items

If you want to provide a menu item beyond simply icon or text, such as providing a more interactive widget, an Action View enables you to do so.  The most common Action View is the `SearchView`, which collapses to show only the search icon and expands to show an `EditText` when the user has clicked an icon. You can also use an Action View to create a custom layout too.

An ActionView is a full fledged view that is constructed via a layout XML file which is embedded into the ActionBar. First, you need to create the XML layout that will be embedded in the ActionBar in `res/layout/action_view_button.xml`:

```xml
<!-- res/layout/action_view_button.xml -->
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" >
    <Button
        android:id="@+id/btnCustomAction"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Button" />
</LinearLayout>
```

Next, we can attach that layout to any item by specifying the `app:action_layout` property:

```xml
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
    <item
        android:id="@+id/miActionButton"
        app:showAsAction="ifRoom"
        app:actionLayout="@layout/action_view_button"
        android:title="Loading..." />
</menu>
```

and now the views specified in the layout are embedded in the ActionBar. The above code results in:

We can access a reference to the embedded ActionView in the Activity by overriding the `onPrepareOptionsMenu` method:

```java
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
	MenuItem actionViewItem = menu.findItem(R.id.miActionButton);
        // Retrieve the action-view from menu
	View v = MenuItemCompat.getActionView(actionViewItem);
        // Find the button within action-view
	Button b = (Button) v.findViewById(R.id.btnCustomAction);
	// Handle button click here
	return super.onPrepareOptionsMenu(menu);
}
```

Using `ActionView` can help you add any custom views you'd like to your ActionBar.

### Adding SearchView to ActionBar

One common example of an `ActionView` is the built-in `SearchView` which provides a simple search control within your application located in the ActionBar. First, we need to add the `SearchView` action item in the menu xml:

```xml
<!-- res/menu/menu.xml -->
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" >
   <item android:id="@+id/action_search"
          android:orderInCategory="5"
          android:title="Search"
          android:icon="@android:drawable/ic_menu_search"
          app:showAsAction="ifRoom|collapseActionView"
          app:actionViewClass="android.support.v7.widget.SearchView" />
</menu>
```

Notice that the `app:showAsAction` attribute also includes the "collapseActionView" value which collapses the search into an icon until clicked. The above code results in the search view in the action bar:

Now we need to hook up a listener for when a search is performed:

```java
// Make sure to import the support version of the SearchView
import android.support.v7.widget.SearchView;

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.main, menu);
    MenuItem searchItem = menu.findItem(R.id.action_search);
    final SearchView searchView = (SearchView) MenuItemCompat.getActionView(searchItem);
    searchView.setOnQueryTextListener(new OnQueryTextListener() {
       @Override
       public boolean onQueryTextSubmit(String query) {
            // perform query here

            // workaround to avoid issues with some emulators and keyboard devices firing twice if a keyboard enter is used
            // see https://code.google.com/p/android/issues/detail?id=24599
            searchView.clearFocus();

            return true;
       }

       @Override
       public boolean onQueryTextChange(String newText) {
           return false;
       }
   });
   return super.onCreateOptionsMenu(menu);
}
```

We can expand the `SearchView` any time programmatically by calling `expandActionView` on the search view:

```java
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // ... lookup the search view
    MenuItem searchItem = menu.findItem(R.id.action_search);
    final SearchView searchView = (SearchView) MenuItemCompat.getActionView(searchItem);
    // Expand the search view and request focus
    searchItem.expandActionView();
    searchView.requestFocus();
}
```

We can customize the search icon and text color with [this approach with styles](http://stackoverflow.com/a/26897024) or the Java code below:

```java
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // ... lookup the search view
    MenuItem searchItem = menu.findItem(R.id.action_search);
    final SearchView searchView = (SearchView) MenuItemCompat.getActionView(searchItem);
    // Use a custom search icon for the SearchView in AppBar
    int searchImgId = android.support.v7.appcompat.R.id.search_button;
    ImageView v = (ImageView) searchView.findViewById(searchImgId);
    v.setImageResource(R.drawable.search_btn);
    // Customize searchview text and hint colors
    int searchEditId = android.support.v7.appcompat.R.id.search_src_text;
    EditText et = (EditText) searchView.findViewById(searchEditId);
    et.setTextColor(Color.BLACK);
    et.setHintTextColor(Color.BLACK);
}
```

We can customize the up button that appears when the search view is activated with [this approach](http://stackoverflow.com/a/35482445/1715285) or the code below:

Use the `app:collapseIcon` to modify the color/style of your drawable.

```xml
<android.support.v7.widget.Toolbar
         android:id="@+id/toolbar"
         android:layout_width="match_parent"
         android:layout_height="@dimen/toolbarHeight"
         app:collapseIcon="@drawable/collapseBackIcon" />
```

See [this writeup](http://antonioleiva.com/actionbarcompat-action-views/) for details on the compatibility action views outlined above. For more advanced searching functionality, check out the [Creating a Search Interface](http://developer.android.com/guide/topics/search/search-dialog.html) guide.

Refer to [this tutorial](http://ramannanda.blogspot.com/2014/10/android-searchview-integration-with.html) for a guide on how to **add autocomplete to your searchview** in the actionbar.

### Using ActionProvider and ShareActionProvider

Similar to an action view, an action provider replaces an action button with a customized layout. However, unlike an action view, an action provider takes control of all the action's behaviors and an action provider can display a submenu when pressed.

You can build your own action provider by extending the ActionProvider class, but Android provides some pre-built action providers such as [ShareActionProvider](http://developer.android.com/reference/android/support/v7/widget/ShareActionProvider.html) which facilitates a "share" action by showing a list of possible apps for sharing.

You can learn about this provider in the [[Sharing Content with Intents]] guide. You can also see the [ActionProvider section](http://developer.android.com/guide/topics/ui/actionbar.html#ActionProvider) of the ActionBar guide for more details.

### Navigating Up with the App Icon

To enable the app icon as an Up button, call [setDisplayHomeAsUpEnabled](http://developer.android.com/reference/android/support/v7/app/ActionBar.html#setDisplayHomeAsUpEnabled(boolean)).

![Up Button](http://i.imgur.com/yEXdmG2.png)

"Up" in contrast to the Back button takes the user to the logical parent screen of the current screen. This is not based on the navigation history but rather on the relationship between screens. For example, in a mail client "Back" might take the user to a previous email but "Up" would always take the user to the list of mail in the inbox.

First, specify that the home icon should be used as "Up":

```java
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_details);
    // Enable up icon
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    ...
}
```

We can also explicitly override the "Up" button in the AppBar in the `onOptionsItemSelected` by checking for the  `android.R.id.home` id being selected:

```java
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
        // This is the up button
        case android.R.id.home:
            NavUtils.navigateUpFromSameTask(this);
            // overridePendingTransition(R.animator.anim_left, R.animator.anim_right);
            return true;
        default:
            return super.onOptionsItemSelected(item);
        }
    }
```

This allows us to configure the transition or otherwise handle behavior when the "up" button is pressed.

#### Compile-time Configuration

To specify the "up" activity at compile-time we can set the logical parent of an activity in the `AndroidManifest.xml`:

```xml
<activity
        android:name="com.example.myfirstapp.ChildActivity"
        android:label="@string/title_activity_display_message"
        android:parentActivityName="com.example.myfirstapp.ParentActivity" >
        <!-- Parent activity meta-data to support API level 7+ -->
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="com.example.myfirstapp.ParentActivity" />
</activity>
```

And now when the home icon is pressed on the child, the parent activity will always be shown.

If you want to navigate up from current activity to it's Parent activity, but want that Parent activity preserves it's state, also specify <singleTop> launch mode for the parent activity in the `AndroidManifest.xml`.
```xml
android:launchMode="singleTop"
```

#### Run-time Configuration

If we want to set the "up" button dynamically rather than in the manifest, we can override the `getSupportParentActivityIntent()` method on the activity returning the desired intent based on the argument passed in:

```java
public static final String PACKAGE_NAME = "com.myapplication.";
public static final String PARENT_NAME_EXTRA = "ParentClassName";

@Override
public Intent getSupportParentActivityIntent() {
    // Extract the class name of our parent
    Intent parentIntent = getIntent();
    String className = parentIntent.getStringExtra(PARENT_NAME_EXTRA);
    // Create intent based on the parent class name
    Intent newIntent = null;
    try {
         //you need to define the class with package name
         newIntent = new Intent(this, Class.forName(PACKAGE_NAME + className));
    } catch (ClassNotFoundException e) {
        e.printStackTrace();
    }
    // Return the created intent as the "up" activity
    return newIntent;
}
```

Then when launching a new activity, we need to supply the `ParentClassName` as an extra to control the desired parent:

```java
Intent intent = new Intent(this, ChildActivity.class);
intent.putExtra(ChildActivity.PARENT_NAME_EXTRA, "ParentActivity");
startActivity(intent);
```

Read more about ["Up" navigation](http://developer.android.com/training/implementing-navigation/ancestral.html) within the official guide.

### Configuring the ActionBar from a Fragment

Configuring the action bar from a fragment is very similar to how it's done from an activity, with a couple small differences. By default, Android assumes that fragments don't want to contribute items to the action bar. When a fragment actually wants to add items to the action bar, it needs to tell Android about this by calling `setHasOptionsMenu(true)` in it's `onCreate()` method:

```java
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // ...

    setHasOptionsMenu(true);
}
```

Now Android knows to call the fragment's `onCreateOptionsMenu(...)` and related methods.

Keep in mind that any action bar items added by the fragment will be appended to any existing action bar items. This includes action bar items added by the containing activity. You can use the `orderInCategory` property of your action bar items to control the ordering yourself.

Adding items to the menu is very similar to how it's done in an activity. Inside a fragment, Android provides a `MenuInflater` for you in the callback:

```java
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    // Inflate the menu; this adds items to the action bar.
    inflater.inflate(R.menu.my_menu, menu);

    // ...
}
```

Handling clicks is exactly the same as if you were in an activity. The only difference is that the fragment's `onOptionsItemSelected(...)` method only gets called if the activity's `onOptionsItemSelected(...)` doesn't handle the click.

```java
@Override
public boolean onOptionsItemSelected(MenuItem item) {
   // handle item selection
   switch (item.getItemId()) {
      case R.id.my_item:
         // Handle this selection
         return true;
      default:
         return super.onOptionsItemSelected(item);
   }
}
```

### Configuring a Split-Action Bar

Split action bar provides a separate bar at the bottom of the screen to display all action items when the activity is running on a narrow screen (such as a portrait-oriented handset). This is helpful when you want to display a top and bottom row of actions for a context.

For **Holo-based themes**, to add support for the split-action bar, just add the option to the manifest for that activity:

```xml
<manifest ...>
    <activity android:uiOptions="splitActionBarWhenNarrow" ... >
        <meta-data android:name="android.support.UI_OPTIONS"
                   android:value="splitActionBarWhenNarrow" />
    </activity>
</manifest>
```

**Note:** Split action bar **only works with Holo-based themes. `splitActionBarWhenNarrow` is **not supported** by `Theme.Material` or the `appcompat-v7` actionbar backport. If you wish to use either Theme.Material or appcompat-v7, you will **need to create your own** "split action bar", by having a [[Toolbar at the bottom|Using-the-App-ToolBar]] of the screen that you populate separately. See the [sample code for a split toolbar](https://github.com/commonsguy/cw-omnibus/tree/master/Toolbar/SplitActionBar2) here.

## Libraries

* [AppCompatActivity](https://developer.android.com/reference/android/support/v7/app/AppCompatActivity.html) - The support library for ActionBar which provides backwards compatibility to nearly all Android versions.
* [StyleGenerator](http://jgilfelt.github.com/android-actionbarstylegenerator) - Use this nifty web tool to generate an ActionBar theme easily.

## References

 * <http://antonioleiva.com/actionbarcompat-how-to-use/>
 * <http://developer.android.com/guide/topics/ui/actionbar.html>
 * <http://developer.android.com/design/patterns/actionbar.html>
 * <http://developer.android.com/reference/android/app/ActionBar.html>
 * <http://developer.android.com/guide/components/fragments.html>
 * <http://www.vogella.com/articles/AndroidActionBar/article.html>
 * <http://jgilfelt.github.io/android-actionbarstylegenerator/>
 * <http://blog.stylingandroid.com/archives/1144>
 * <http://nikolakirev.com/android-tutorial-adding-buttons-to-the-action-bar-guest-post/>
 * <http://writecodeeasy.blogspot.com/2012/07/androidtutorial-actionbar.html>
 * <http://www.grokkingandroid.com/adding-actionviews-to-your-actionbar/>
 * <http://www.intertech.com/Blog/android-action-bar-from-the-options-menu/>
 * <http://android-developers.blogspot.com/2011/04/customizing-action-bar.html>

repository: teocci/AndroidGuidenotes

repo_name: teocci/AndroidGuidenotes


text:
### [CVE-2014-6278](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-6278)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

GNU Bash through 4.3 bash43-026 does not properly parse function definitions in the values of environment variables, which allows remote attackers to execute arbitrary commands via a crafted environment, as demonstrated by vectors involving the ForceCommand feature in OpenSSH sshd, the mod_cgi and mod_cgid modules in the Apache HTTP Server, scripts executed by unspecified DHCP clients, and other situations in which setting the environment occurs across a privilege boundary from Bash execution.  NOTE: this vulnerability exists because of an incomplete fix for CVE-2014-6271, CVE-2014-7169, and CVE-2014-6277.

### POC

#### Reference
- http://lcamtuf.blogspot.com/2014/10/bash-bug-how-we-finally-cracked.html
- http://packetstormsecurity.com/files/128567/CA-Technologies-GNU-Bash-Shellshock.html
- http://packetstormsecurity.com/files/137344/Sun-Secure-Global-Desktop-Oracle-Global-Desktop-Shellshock.html
- http://www.qnap.com/i/en/support/con_show.php?cid=61
- https://www.exploit-db.com/exploits/39568/
- https://www.exploit-db.com/exploits/39887/

#### Github
- https://github.com/0xBeacon/CiscoUCS-Shellshock
- https://github.com/0xICF/ShellScan
- https://github.com/3llio0T/Active-
- https://github.com/ARPSyndicate/cvemon
- https://github.com/CyberlearnbyVK/redteam-notebook
- https://github.com/EvanK/shocktrooper
- https://github.com/Jay-Idrees/UPenn-CyberSecurity-Penetration-Testing
- https://github.com/LiuYuancheng/ChatGPT_on_CTF
- https://github.com/Meowmycks/OSCPprep-SickOs1.1
- https://github.com/MrCl0wnLab/ShellShockHunter
- https://github.com/Parist0nH1ll/Vulnerabilities-Write-Ups
- https://github.com/albinowax/ActiveScanPlusPlus
- https://github.com/derickjoseph8/Week-16-UCB-Homework
- https://github.com/ericlake/fabric-shellshock
- https://github.com/foobarto/redteam-notebook
- https://github.com/googleinurl/Xpl-SHELLSHOCK-Ch3ck
- https://github.com/hannob/bashcheck
- https://github.com/inspirion87/w-test
- https://github.com/mrash/afl-cve
- https://github.com/mubix/shellshocker-pocs
- https://github.com/notsag-dev/htb-shocker
- https://github.com/opragel/shellshockFixOSX
- https://github.com/readloud/ShellShockHunter-v1.0
- https://github.com/rrmomaya2900/0dayWriteup-THM
- https://github.com/swapravo/cvesploit
- https://github.com/thatchriseckert/CiscoUCS-Shellshock
- https://github.com/trhacknon/Xpl-SHELLSHOCK-Ch3ck
- https://github.com/xdistro/ShellShock

license: MIT

repository: trickest/cve

branch_name: refs/heads/main

extension: md

gha_language: HTML

gha_license_id: MIT

license_type: permissive

repo_name: trickest/cve


text:
# Pie Charts

![](http://ForTheBadge.com/images/badges/made-with-python.svg)

## Dependencies

![](https://img.shields.io/badge/pandas-1.2.3-150458?style=for-the-badge&logo=pandas)
![](https://img.shields.io/badge/matplotlib-3.3.4-224099?style=for-the-badge)

## Introduction

A `pie chart` (or a circle chart) is a circular statistical graphic, which is divided into slices to illustrate numerical proportion. In a pie chart, the arc length of each slice (and consequently its central angle and area), is proportional to the quantity it represents.

While it is named for its resemblance to a pie which has been sliced, there are variations on the way it can be presented. Pie charts are very widely used in the business world and the mass media.

The [Notebook here](Notebook.ipynb) contains the code of pie charts like the one shown below.

![](img.png)

## Thanks for Reading :)

path: /Code/Pie Chart/README.md

branch_name: refs/heads/master


text:
# Emoji Cursor

## Public version

You can use the public version of this site here:

https://www.emojicursor.app/

## Installation

```bash
git clone https://github.com/kylekelly/emoji-cursor
cd emoji-cursor
npm install
npm run start
```

repository: kylekelly/emoji-cursor

repo_name: kylekelly/emoji-cursor


text:
# Security team

We think that security is an enabler for the business. Sourcegraph is committed to proactive security, and addressing vulnerabilities in a timely manner. We approach security with a can-do philosophy, and look to achieve product goals while maintaining a positive posture, and increasing our security stance over time.

## Contact

- [security<EMAIL_ADDRESS>- #security channel Slack.
- [@sourcegraph/security](https://github.com/orgs/sourcegraph/teams/security) on GitHub.
- [report a vulnerability](reporting-vulnerabilities.md)

## Goals

These goals represent our targeted work for 70% of our time. The remaining 30% is reserved for items that arise such as security reports. Our current work is documented in our [tracking issue](https://github.com/sourcegraph/sourcegraph/issues?q=is%3Aissue+label%3Atracking+label%3Ateam%2Fsecurity+is%3Aopen).

### Visibility into Sourcegraph Cloud's attack surface

**Problem:** The Cloud team is working toward [private code on Sourcegraph Cloud](../cloud/index.md#private-code-on-sourcegraph-cloud). Before we can have [confidence in our security model](#confidence-in-our-security-model), we first need to have visibility into current risks, issues, and threats, so we can proactively plan what work needs to be done (i.e., we don't want to be relying on or waiting for security researchers or customer to report vulnerabilities to us).

**Milestones:**

1. All Docker images are continuously scanned for known security vulnerabilities and the security team is alerted as vulnerabilities are found. (3.21 release)
    1. Three or more vulnerabilities with a high severity, or a CVSS score of at least 4.0 are resolved. (3.21 release)
1. We have resolved container vulnerabilities with a high severity, or a CVSS score of at least 4.0, or that resolution is planned. (3.22 release)
1. All compute nodes are continuously scanned for known security vulnerabilities and the security team is alerted as vulnerabilities are found. (3.22 release)
    1. We have resolved compute vulnerabilities with a high severity, or a CVSS score of at least 4.0, or that resolution is planned. (3.23 release)
1. Implement centralized storage of all of our existing logs (e.g., application logs, compute infrastructure logs). (3.23 release)
1. Start collecting audit and access logs (e.g., visibility into both intentional and unintentional logins). This is useful from both a security visibility point of view, as also a requirement for various auditing frameworks (though not currently a target). (3.23 release)
1. Normalize log format in our centralized log storage so that it is easier to correlate and search. This is a prerequisite for creating automated alerts from the logs. (3.24 release)
1. Create alerts and dashboards to automate the process of investigating events of interest (e.g., detect and alert on a spike of failed login attempts to a single account, or across Sourcegraph Cloud as a whole). (3.24 release)

### Confidence in our security model

**Problem:** We need to have a high degree of confidence in our overall security before we ask paying customers to trust us with their private code.

**Milestones:**

1. We need a better way to store and access [our own secrets](https://docs.google.com/document/d/1HzO7szEm-h4fqlQOnVbcJdpDmfQiM7Rb-Tz4CMEYl-Q).
1. We connect our [test security repository](https://github.com/sourcegraph/security-test/blob/main/README.md) to Sourcegraph Cloud and only [members who can access that repository on GitHub](https://github.com/sourcegraph/security-test/settings/access) can access that repository on Sourcegraph Cloud (i.e., [Sourcegraph organization owners](https://github.com/orgs/sourcegraph/people?query=role%3Aowner) and [@sourcegraph/security](https://github.com/orgs/sourcegraph/teams/security) members). (3.22 release)
   - **DEPENDENCY:** We can't do this until we can have [private code on Sourcegraph Cloud](../cloud/index.md#private-code-on-sourcegraph-cloud)
1. We advertise a bounty for each unique vulnerability that allows an unauthorized person to gain access to our [test security repository](https://github.com/sourcegraph/security-test/blob/main/README.md) on Sourcegraph Cloud. (3.23 release)
   - **DEPENDENCY:** This milestone depends on milestone 3 of [Visibility into Sourcegraph Cloud's attack surface](#visibility-into-sourcegraph-clouds-attack-surface). We should detect and fix the obvious issues ourselves before we start to invite others to attack us with large bounties.
1. We run a time-bound capture the flag event where there are larger bounties for being able to gain access to our [test security repository](https://github.com/sourcegraph/security-test/blob/main/README.md) on Sourcegraph Cloud. (3.24 release)
1. We host our private [infrastructure repository](http://github.com/sourcegraph/infrastructure) on Sourcegraph Cloud. (TBD, somewhat dependent on outputs of CtF)
1. We allow paying customers to host their private code on Sourcegraph Cloud. (TBD, somewhat dependent on outputs of CtF)

----

## Responsibilities

- Proactively improve the security of our application and infrastructure.
- Define, plan, and prioritize security work that needs to be done (and then go do that work).
- Directly contribute to our codebase (i.e., Go, TypeScript, Kubernetes, Docker, Google Cloud Platform) to secure our application and deployments, and help other engineers on our team make the necessary changes.
- [Respond to security vulnerability reports](#how-we-respond-to-security-vulnerability-reports)
  - https://github.com/sourcegraph/security-issues
- Increase our security posture by running traditional security tools such as vulnerability scanners, SAST, and DAST tools.
  - https://github.com/sourcegraph/sourcegraph/security/code-scanning
- Create a culture of security at Sourcegraph that empowers all of our engineers to write secure code.

## How we work

On the security team, we work by planning, tracking, and reviewing - creating a feedback mechanism targeting our own continuous improvement based on the things we learn.

### Principles

1. [Goals](https://about.sourcegraph.com/company/goals/guidelines) are something we strive for, whilst tracking and communicating progress.
2. A work item is a piece of work (e.g., writing code, hiring a new teammate) that makes progress toward achieving a goal.
3. Releases may be made up of N workitems, that may impact Y goals. Whilst this is true, we communicate both internally and externally progress towards those goals.
4. Security by its various nature has public work items ([main repo](https://github.com/sourcegraph/sourcegraph) and private workitems ([security repo](https://github.com/sourcegraph/security-issues/)). Over time workitems should move from the private repository to the public repository once they can be made public. The ideal goal state is the lack of a private security repository.

### Planning

1. We plan iterations and features prior to their execution, in a team planning session.
2. We set one or more goals for the iteration.
3. We write RFCs and solicit feedback ideally, prior to the start of an iteration, but especially with forethought in mind.
4. We hold weekly team syncs and [track them here](https://docs.google.com/document/d/1l-JyN-hol2G6YXNqPsJsIgN2z3aZEzOW4-Julu4xthI).
5. We report on our status and progress weekly in [tracking issues](https://github.com/sourcegraph/sourcegraph/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Atracking+label%3Ateam%2Fsecurity), and radiate communication.

### Tracking

1. Goals are the combination of a [GitHub project](https://github.com/orgs/sourcegraph/projects?query=is%3Aopen+Security) and issues with tags. GitHub tracking issue (labels: tracking, team/security) with an additional label (secgoal:<someshortthing1>) support tracking against a goal.
   a. Work items impacting this goal are created in GitHub, by using the labels team/security and secgoal:<someshortthing1>.
   b. When a work item is targets a specific release, the appropriate tracking label is added.
   c. Milestones for individual goals are communicated on the goal tracking issue.
2. Tracking issues are used for communicating status. We embrace the small, incremental, but well thought out changes. This provides the added benefit of easing communication with our customers, both internal and external.
   a. By tagging work items, the tracking issues are the source of truth on a per release basis.
   b. Each release has at least one goal associated with it, communicated in the tracking issue. These goals are release specific, meaning they may or may not be reflected in our existing project goals.

### Learning

After the each release, we hold a [retrospective](https://about.sourcegraph.com/retrospectives). We try to understand the degree to which we achieved the goals we communicated at the beginning of the iteration. We identify what went well and what our opportunities for improvement. We actively choose one of the things we've learned, and target its improvement.

### Working with other teams

The security team helps other teams investigate, orient, review, and sometimes plan changes.

**Small changes**

Small changes, defined as less than 1 day of effort are communicated in a GitHub issue, either in the [sourcegraph repository](https://www.github.com/sourcegraph/sourcegraph) or, when sensitive in nature, the [security repository](https://www.github.com/sourcegraph/security-issues). We provide a detailed bug report, including the steps to reproduce, and an example of the desired state. Where possible, we identify and propose a fix, and submit a pull request to the [code owner](../code_reviews.md#who-should-i-get-a-code-review-from).

**Medium changes**

Medium changes operate on the same principle as small changes, except that the code owner is always the one driving it. These changes also include a documented test plan for validation of the security change. These changes are usually take no more than one week.

**Large changes**

Changes that are cross-cutting or requiring greater than one week of effort are large, and communicated through [RFCs](../../communication/rfcs/index.md). The RFC provides as much context as possible about the issue, the reason for the change, and its relative importance and urgency. We collaborate on the RFC as a team, sharing the RFC with the Engineering Manager(s) for the impacted team for both feedback and [prioritizing](../../product/prioritizing.md). Upon approval, we create GitHub issues, labeling them with a new label, for the RFC (i.e RFC-214), sharing with the Engineering Manager. When possible, a member of the security team attends the planning session, to help provide input should more be needed.

**Providing input**

Teams planning and executing changes should ask for Pull Request reviews from the Security Team as needed to gain confidence in the implementation. Teams should also feel free to ask for a security review of any RFC they're working on that aren't directly created from the Security Goals.

## Members

- [Chayim Kirshen](../../../company/team/index.md#chayim-kirshen-he-him) ([Engineering Manager](../roles.md#engineering-manager)).
- [Elizabeth Stirling](../../../company/team/index.md#elizabeth-stirling-she-her)

## Open Positions

[Software Engineer - Security](../../engineering/hiring/software-engineer-security.md)

repository: jdsnapa/about

repo_name: jdsnapa/about


text:
# Services

The decorator `@Service()` declare a new service can be injected in other service or controller on there `constructor()`.
All services annotated with `@Service()` are constructed one time.

## Configuration

You must adding the `services` folder on `componentsScan` attribute in your server settings as follow :

```typescript
import {ServerLoader, ServerSettings} from "@tsed/common";

@ServerSettings({
   rootDir: __dirname,
   mount: {
      '/rest': `./controllers/**/**.js`
   },
   componentsScan: [
       `./services/**/**.js`
   ],
   customServiceOptions: {}
})
export class Server extends ServerLoader {

}
```

## Decorators

<ApiList query="module === '@tsed/di' && symbolType === 'decorator'" />

## Declaring a service

Create a new file in your services folder. Create a new Class definition and add the `@Service()` annotation on your class.

```typescript
import {Configuration, Injectable} from "@tsed/di";
import {OnInit, BeforeRoutesInit, OnRoutesInit, AfterRoutesInit, OnServerReady} from "@tsed/common"

@Injectable()
export class MyService implements OnInit, BeforeRoutesInit, OnRoutesInit, AfterRoutesInit, OnReady {
    private settings = {};

    constructor(@Configuration() private configuration: Configuration) {
        this.settings = this.configuration.get<any>('customServiceOptions');
    }

    public getSettings() {
        return this.settings;
    }
}
```

Finally, inject the service to another service:
```typescript
import {Injectable} from "@tsed/di";
import {MyService} from "./MyService";

@Injectable()
export class FooService {
    constructor(private myService: MyService) {

    }
}
```
Or to another controller:

```typescript
import {Controller} from "@tsed/di";

import {MyService} from "./MyService";

@Controller('/rest')
class MyController {
    constructor(private myService: MyService){

    }
}
```

## Override a Service

The decorator [@OverrideService](/api/di/decorators/OverrideService.md) gives you the ability to
override some internal Ts.ED service like the [ParseService](/api/common/filters/services/ParseService.md).

Example usage:
```typescript
import {OverrideProvider} from "@tsed/di";
import {ParseService} from "@tsed/common";

@OverrideProvider(ParseService)
class CustomParseService extends ParseService {

}
```

## Lifecycle Hooks

Ts.ED 2.x introduce a new Lifecycle Hooks on the service that follows the [Hooks](/docs/hooks.md).
This lifecycle hooks that provide visibility into these key life moments and the ability to act when they occur.

A service that uses one of the phases of the lifecycle can add a number of things and can be completely autonomous.
This is the case with the example of the socket server (See the section [How to integrate Socket.io](/tutorials/socket-io.md)).

This schemes resume the order hooks called by Ts.ED:

![lifecycle-hooks](./../assets/hooks-in-sequence.png)

Each interface has a single hook method whose name is the interface name prefixed with `$`. For example, the `OnInit`
interface has a hook method named `$onInit()` (old name `$onInjectorReady`) or that Ts.ED calls when all services are built.

```typescript
import {Hooks} from "@tsed/common";
import {Injectable, OnInit, Configuration} from "@tsed/di";

@Injectable()
export class MyService implements Hooks, OnInit {
  private settings = {};

  constructor(@Configuration() private configuration: Configuration) {
    this.settings = this.configuration.get<any>('customServiceOptions');
  }

  $onInit(): Promise<any> | void {
  }

  $beforeRoutesInit(): Promise<any> | void {
  }

  $afterRoutesInit(): Promise<any> | void {
  }

  $onReady(): Promise<any> | void {
  }
}
```

Since <Badge text="v4.31.0+" />, it also possible to handle `$onDestroy` hook when a service or a controller is
annotated with `@Scope('request')`:

```typescript
import {Injectable, Scope, OnDestroy} from "@tsed/di";

@Injectable()
@Scope('request')
export class MyService implements OnDestroy {
  $onDestroy() {
    console.log('Service destroyed');
  }
}
```

Hook | Purpose and Timing
---|---
$onInit | Respond after Injector have initialized all Services in the registry.
$beforeRoutesInit | Respond before loading the controllers. The middlewares and filters are already built.
$afterRoutesInit | Respond after the controllers build.
$onReady | Respond when the server is ready. At this step, HttpServer or/and HttpsServer object is available. The server listen the port.
$onDestroy | Respond when a Service or Controller is destroyed (uniquely when class is annoted with `@Scope('request')`.

::: tip Interfaces are optional

The interfaces are optional for JavaScript and Typescript developers from a purely technical perspective.
The JavaScript language doesn't have interfaces. Ts.ED can't see TypeScript interfaces at runtime because they disappear from the transpiled JavaScript.

Nonetheless, it's good practice to add interfaces to TypeScript directive classes in order to benefit from strong typing and editor tooling.
:::

repository: Szauka/ts-express-decorators

gha_language: TypeScript

repo_name: Szauka/ts-express-decorators


text:
---
layout: layout.pug
navigationTitle:  Release Notes for 1.11.0 Release Candidate 1
title: Release Notes for 1.11.0 RC 1
menuWeight: 50
excerpt: Release notes for DC/OS 1.11.0 release candidate 1
---

These are the release notes for DC/OS 1.11.0 Release Candidate 1.

[button color="purple" href="https://downloads.dcos.io/dcos/EarlyAccess/1.11.0-rc1/dcos_generate_config.sh"]Download DC/OS Open Source[/button]

To download DC/OS Enterprise, contact: [Mesosphere Support](https://support.mesosphere.com/hc/en-us/articles/213198586).

This release candidate is for testing only and not to be used in production.

DC/OS 1.11.0 Release Candidate 1 has a number of limitations that will be resolved at GA time.

DC/OS 1.11 requires CLI version 0.6.x.

Uninstall the existing CLI.

Install version 0.6.x using the Install CLI instructions in the dropdown in the upper left hand corner of the 1.11 DC/OS GUI.

Note: CLI version 0.6.x is not compatible with DC/OS 1.10

Please try out the new features and updated data services. Provide any feedback through our support channel: support.mesosphere.com.

# New features and capabilities

## Apache Mesos 1.5, Marathon 1.6, and Kubernetes 1.9 Integrated.
- DC/OS 1.11.0 is is based on Mesos 1.5. View the [Mesos changelog](https://github.com/apache/mesos/blob/1.5.x/CHANGELOG).
- DC/OS 1.11.0 is integrated with the latest 1.6 release of Marathon. For more information about Marathon 1.6, consult the [Marathon changelog](https://github.com/mesosphere/marathon/blob/master/changelog.md).
- DC/OS 1.11.0 supports latest Kubernetes 1.9 Container Scheduler. For more information about Kubernetes 1.0 on DC/OS, [view the documentation](https://docs.mesosphere.com/services/kubernetes/1.0.0-1.9.3).

## Platform
- Fault domain awareness.  [View the documentation](/1.11/deploying-services/fault-domain-awareness). [enterprise type="inline" size="small" /]
- Linked clusters. A cluster link is a _**unidirectional**_ relationship between a cluster and another cluster. You add and remove links from one cluster to another cluster using DC/OS CLI. Once a link is set up you can easily switch between clusters using the CLI or UI. [View the documentation](/1.11/administering-clusters/multiple-clusters/cluster-links). [enterprise type="inline" size="small" /]
- Integrated Remote Regions. Enables “Bursting” to take advantage of ephemeral cloud compute resources. [View the documentation](/1.11/deploying-services/fault-domain-awareness). [enterprise type="inline" size="small" /]
- [Multi-Region Management](/1.11/deploying-services/fault-domain-awareness). Enables a DC/OS Cluster to span multiple datacenters, clouds and remote branches while providing a unified management and control cluster.
- Decommission Node. Support for permanently decommissioning nodes enables easier maintenance and decommissioning “Spot” Cloud Instances after use allowing for immediate task rescheduling as opposed delayed task rescheduling.
- UCR
  - Support for Docker image garbage collection. [View the documentation](/1.11/deploying-services/containerizers).
  - Support for Docker image pull secrets.

## Networking
[enterprise]
- Edge-LB 1.0 RC candidate. [View the documentation](https://docs.mesosphere.com/services/edge-lb/1.0/)
[/enterprise]
- IPv6 is now supported for Docker containers.
- Performance improvements to the DC/OS network stack. All networking components (minuteman, navstar, spartan) are aggregated into a single systemD unit called `dcos-net`. Please read the note on [networking software re-architecture](/1.11/networking/#a-note-on-software-re-architecture) to learn more about the re-factoring of the network stack.

[enterprise]
## Security
[/enterprise]
- Secrets Management Service
  - Binary Secret files are now supported
  - Hierarchical access control is now supported.

## Monitoring
- The DC/OS metrics component now produces metrics in [Prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/) format. [View the documentation](/1.11/metrics).
- Unified Logging Endpoint to Collect Container (task) as well as System Component Logs.

## Storage
- DC/OS 1.11 introduces an implementation of the industry-standard Container Storage Interface (CSI) version 0.1, which enables developers (Mesosphere, community, and partners) to streamline the development of storage features within DC/OS by providing a common API between the Container Orchestrator (DC/OS) and the storage devices. [enterprise type="inline" size="small" /]
- Pods now support persistent volumes. [View the documentation](/1.11/deploying-services/pods).

**Note:** Because these storage features are beta in 1.11, they must be explicitly enabled. Beta features are not recommended for production usage, but are a good indication of the direction the project is headed.

## Updated DC/OS Data Services
- TLS encryption for DC/OS Kafka, DC/OS Cassandra, DC/OS Elastic, and DC/OS HDFS is now supported.
- Fault domain awareness for DC/OS Kafka, DC/OS Cassandra, DC/OS Elastic and DC/OS HDFS.
- New API endpoint to pause a node for DC/OS Kafka, DC/OS Cassandra, DC/OS Elastic, and DC/OS HDFS. Use this endpoint to relaunch a node in an idle command state for debugging purposes.
- New beta DC/OS Kafka ZooKeeper service. [View the documentation](/services/beta-kafka-zookeeper).
- You can now select a DC/OS data service version from a dropdown menu in the DC/OS UI.
- Improved scalability for all DC/OS data services.

# Known Issues and Limitations
- Upgrades from 1.10 to 1.11 are _not supported_ in 1.11.0 Release Candidate 1.
- DCOS-19047 - The `dcos-secrets` service is unavailable during upgrade from 1.10.x to 1.11.0. [enterprise type="inline" size="small" /]

# Improvements and Major Issues Fixed in 1.11.0 Release Candidate 1
- DCOS-19573 - Add support for changes to unique constraints in the UI.
- DCOS-19837 - Consolidate fault-domain scripts for all cloud providers into one script to support clusters with multiple cloud providers.
- DCOS-19896 - Add `--linked` flag to `dcos cluster list` so users can see which clusters can be unlinked. [enterprise type="inline" size="small" /]
- DCOS-19955 - Enhance API and CLI experience for linking clusters. [enterprise type="inline" size="small" /]
- DCOS_OSS-1658 - Add `--verbose` flag to upgrade script that prints all status and error messages to the console to enable upgrade debugging.
- DCOS_OSS-1733 - The configuration parameter `dns_forward_zones` now takes a list of objects instead of nested lists.
- DCOS_OSS-2130 - `systemd-networkd` must be enabled for DC/OS networking to work with CoreOS.

**Note:** The Kubernetes package dependencies are documented [here](https://docs.mesosphere.com/services/kubernetes/1.2.0-1.10.5/install).

repository: ShaunDeng/dcos-docs-site

repo_name: ShaunDeng/dcos-docs-site


text:
Yii extension for Livejournal.com
=============

With ELivejournal class you can create new entries and update existing entries in your LiveJournal.com blog.

- License: [MIT](https://opensource.org/licenses/MIT)
- Developed by [Artem Frolov](http://frolov.net)

Requirements
-------------
- Yii 1.0, 1.1 or above
- Enabled XML-RPC support in PHP

Usage
-------------
#### Simple usage:
```php
Yii::import('ext.livejournal.*');
$post = new ELivejournal('username', 'password');
$post->subject = 'Subject test';
$post->body = 'Hello, <b>world</b>';
if ($post->save())
{
	echo "Entry's id: ".$post->id;
	echo "<br />Entry's url: ".$post->url;
}
else
{
	echo '<b>Error (code '.$post->errorCode.'): </b>';
	echo $post->error;
}
```

#### Advanced usage:
```php
Yii::import('ext.livejournal.*');
$post = new ELivejournal('username', 'md5_hash_of_the_password', true);

//Use the following line if you want to update an entry by id
//$post->id = 2;

$post->subject = 'Subject test';
$post->body = 'Hello, <b>world</b>';

//Entry's time will be 'now' + 1 week
$post->time = time() + 60*60*24*7;

//Entry's tags will be 'red,green,blue'
$post->tags = array('red','green');
$post->addTag('blue');

//Entry's properties from http://www.livejournal.com/doc/server/ljp.csp.proplist.html
//current music
$post->setMetadata('current_music','Muse - Butterflies and hurricanes');
//Comments will be disabled
$post->setMetadata('opt_nocomments',true);

//Entry will be visible only for friends
$post->setPrivate();

//Turns on \r and \n removing from the entry's body
//Sometimes it's useful because LiveJournal.com translates new lines to <br>
$post->setDeleteNewLines();

if ($post->save())
{
	echo "Entry's id: ".$post->id;
	echo "<br />Entry's url: ".$post->url;
}
else
{
	echo '<b>Error (code '.$post->errorCode.'): </b>';
	echo $post->error;
}
```

## Change log
#### yii-livejournal 1.0 (Mar 12, 2016)
- minor fixes

#### yii-livejournal 0.3 (Dec 23, 2011)
- fixed: now extension is compatible with the latest API where User-Agent header is
required

#### yii-livejournal 0.2 (Sep 9, 2011)
- changed: you don't have to store original livejournal.com password because now ELivejournal constructor can accept md5 hash of the password

#### yii-livejournal 0.1.1 (Aug 25, 2011)
- minor fixes

## Resources
- [yii-livejournal extension page on yiiframework.com](http://www.yiiframework.com/extension/livejournal)
- [Composer package on packagist.com](https://packagist.org/packages/artem-frolov/yii-livejournal)

repository: artem-frolov/yii-livejournal

repo_name: artem-frolov/yii-livejournal


text:
A [BrowserChannel](http://closure-library.googlecode.com/svn/trunk/closure/goog/net/browserchannel.js) server.

**tldr;** Its like socket.io, but it scales better and it has fewer bugs. It
just does long polling. It also doesn't support websockets and doesn't support
cross-domain requests out of the box.

BrowserChannel is google's version of [socket.io](http://socket.io) from when they first put
chat in gmail. Unlike socket.io, browserchannel guarantees:

- Messages will arrive in order
- Messages will never arrive on the server after a connection has closed
- The mail will always get through on any browser that google talk works on, which is all of them.

[![Build Status](https://secure.travis-ci.org/josephg/node-browserchannel.png)](http://travis-ci.org/josephg/node-browserchannel)

node-browserchannel:

- Is compatible with the closure library's browserchannel implementation
- Is super thoroughly tested
- Works in IE5.5+, iOS, Safari, Chrome, Firefox, etc.
- Works in any network environment (incl. behind buffering proxies)

---

# Use it

    # npm install browserchannel

Browserchannel is implemented as connect middleware. Here's an echo server:

```javascript
var browserChannel = require('browserchannel').server;
var connect = require('connect');

var server = connect(
  connect.static("#{__dirname}/public"),
  browserChannel(function(session) {
    console.log('New session: ' + session.id +
      ' from ' + session.address +
      ' with cookies ' + session.headers.cookie);

    session.on('message', function(data) {
      console.log(session.id + ' sent ' + JSON.stringify(data));
      session.send(data);
    });

    session.on('close', function(reason) {
      console.log(session.id + ' disconnected (' + reason + ')');
    });

    // This tells the session to disconnect and don't reconnect
    //session.stop();

    // This kills the session.
    //session.close();
  })
);

server.listen(4444);

console.log('Echo server listening on localhost:4444');
```

The client emulates the [websocket API](http://dev.w3.org/html5/websockets/). Here is a simple client:

```javascript
var BCSocket = require('browserchannel').BCSocket;

var socket = new BCSocket('http://localhost:4321/channel');
socket.onopen = function() {
  socket.send({hi:'there'});
};
socket.onmessage = function(message) {
  console.log('got message', message);
};

// later...
socket.close()
```

... Or from a website:

```html
<html><head>
<script src='/channel/bcsocket.js'></script>
<script>
socket = new BCSocket('/channel');
socket.onopen = function() {
  socket.send({hi:'there'});
  socket.close();
};
socket.onmessage = function(message) {
  // ...
};
</script>
```

You can also ask the client to automatically reconnect whenever its been disconnected. - Which is
super useful.

```javascript
var BCSocket = require('browserchannel').BCSocket;
socket = new BCSocket('http://localhost:4321/channel', reconnect:true);
socket.onopen = function() {
  socket.send("I just connected!");
};
```

---

# Differences from Websocket

- You can send messages before the client has connected. This is recommended,
  as any messages sent synchronously with the connection's creation will be
  sent during the initial request. This removes an extra round-trip.
- The send method can pass a callback which will be called when the message has
  been received. **NOTE**: If the client closes, it is not guaranteed that this
  method will ever be called.
- Send uses google's JSON encoder. Its almost the same as the browser one, but
  `{x:undefined}` turns in to `{x:null}` not `{}`.

# API

## Server API

The server is created as connect / express middleware. You create the middleware by calling

```javascript
var browserChannel = require('browserchannel').server;

var middleware = browserChannel(options, function(session) {
  ...
});

// Express
app.use(middleware);
```

The options object is optional. The following server options are supported:

- **hostPrefixes**: Array of extra subdomain prefixes on which clients can
connect. Even modern browsers impose per-domain connection limits, which means
that when you have a few tabs open with browserchannel requests your
connections might stop woroking. Use subdomains to get around this limit.
For example, if you're listening for connections on *example.com*, you can
specify `hostPrefixes: ['a', 'b', 'c']` to make clients send requests to
*a.example.com*, *b.example.com* and *c.example.com*.
- **base**: The base URL on which to listen for connections. (Defaults to
`"/channel"`). Think of the base URL as a URL passed into `app.use(url,
middleware)`.
- **headers**: Map of additional response headers to send with requests.
- **cors**: Set `Access-Control-Allow-Origin` header. This allows you to
specify a domain which is allowed to access the browserchannel server. See
[mozilla documentation](https://developer.mozilla.org/en/http_access_control)
for more information. You can set this to `'*'` to allow your server to be
accessed from clients on any domain, but this may open up security
vulnerabilities in your application as malicious sites could get users to
connect to your server and send arbitrary messages.
- **corsAllowCredentials**: (Default *false*) Sets the
`Access-Control-Allow-Credentials` header in responses. This allows
cross-domain requests to send their cookies. You cannot do this if you set
`cors:'*'`. To make this work you must also add the `{crossDomainXhr:true}`
option in the client. See [mozilla
documentation](https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS#Requests_with_credentials)
for more information. Setting this is equivalent to setting
`headers:{'Access-Control-Allow-Credentials':true}`.
- **keepAliveInterval**: (Default *20000 = 20 seconds*). Keepalives
are sent periodically to make sure http connections aren't closed by eager
clients. The standard timeout is 30 seconds, so sending keepalives every 20
seconds keeps the connection healthy. Time is specified in milliseconds
- **sessionTimeoutInterval**: (Default *30 seconds*). Amount of time we wait
before evicting a client connection. Setting this lower will make the server
notice disconnected clients more quickly. Setting it higher will make
connections more resiliant to temporary network disconnection. Time specified
in milliseconds.

Note that by default, CORS support is disabled. This follows the lead of
browsers. Be very careful when enabling CORS & CORS credentials. You should
explicitly whitelist sites from which your users will connect.

Setting hostPrefixes in production is important - if you don't enable host
prefixes, browserchannel will stop working for a user once they have more than
a couple of tabs open. Set DNS rules to make the extra prefixes all point to
the same server / cluster.

### Client sessions

Whenever a client connects, your middleware's method is called with the new
session. The session is a nodejs event emitter with the following properties:

- **id**: An ID that is unique to the session.
- **address**: A string containing the IP address of the connecting client.
- **query**: An object containing the parsed HTTP query of the initial
connection. Any custom query parameters will be exposed on this object.
- **state**: The current state of the connection. One of `'init'`, `'ok'` and
`'closed'`. When the state is changed, the client will emit a *state changed*
event with the old state and new state as event parameters.
- **appVersion**: The client's reported application version, or null. You can
use this to reject clients which are connecting from old versions of your
client.

#### Sending messages

You can **send messages** to the client using `client.send(data, callback)`. The
data parameter will be automatically JSON.stringified. If specified, the
callback will be called once the message has been acknowledged by the client.

> Note: If you wrap a browserchannel connection in a nodejs stream, don't use
> the callback. Node streams will only allow one message to be in flight at a
> time. As a result, you'll get much lower message throughput than you
> otherwise should.

#### Receiving messages

Receive messages through the `message` event.

```javascript
session.on('message', function(data) {
  // ...
});
```

The message will be a javascript object if you sent a javascript object using
the client API.

#### Stopping and closing connections

Browserchannel has two different methods for closing client connections, *session.stop*
and *session.close*. Both methods disconnect the client. The difference is that
stop also tells the client not to reconnect. You should use close when a
recoverable server error occurs, and stop when the client is in an
unrecoverable invalid state.

For example, if an exception occurs handling a message from a client, you may
want to call close() to force the client to reconnect. On the other hand, if a
browser is trying to connect using an old version of your app, you should call
stop(). In the browser, you can handle the stop message with a notice to
refresh the browser tab.

#### Events

The client is an event emitter. It fires the following events:

- **close (reason)**: The client connection was closed. This will happen for a variety
of reasons (timeouts, explicit disconnection from the client, disconnection
from the server, etc). Once a client has closed, it is gone forever. If the
client reconnects, it will do so by establishing a new session.
- **message (data)**: The server received a message from the client. The data
object will be a javascript object.
- **state changed (oldstate, newstate)**: The client's state changed. Clients
start in the 'init' state. They move to the 'ok' state when the session is
established then go to the 'closed' state. If a client reconnects, they will
create an entirely new session. init -> ok -> closed are the only three valid
state transitions.

## Client API

For the most part, the client API is identical to websockets.

```javascript
var socket = new BCSocket(hostname, opts);
```

opts is optional, and if it exists it should be an object which can contain the
following properties:

- **appVersion**: Your application's protocol version. This is passed to the server-side
  browserchannel code, in through your session handler as `session.appVersion`
- **prev**: The previous BCSocket object, if one exists. When the socket is established,
  the previous bcsocket session will be disconnected as we reconnect.
- **reconnect**: Tell the socket to automatically reconnect when its been disconnected.
- **failFast**: Make the socket report errors immediately, rather than trying a
  few times first.
- **crossDomainXhr**: Set to true to enable the cross-origin credential
  flags in XHR requests. The server must send the
  Access-Control-Allow-Credentials header and can't use wildcard access
  control hostnames. See:
    http://www.html5rocks.com/en/tutorials/cors/#toc-withcredentials
- **affinity**: Set to null to disable session affinity token passing.
- **affinityParam**: Session affinity tokens are sent in the query string as
  the GET parameter `a` by default. Your application may override the
  variable name if there is a query string conflict.

There are a couple of differences from the websocket API:

- You can (and are encouraged to) call `send()` using JSON objects instead of
mere strings. JSON serialization is handled by the library, and works in all
browsers.
- You can send messages immediately before the session is established. This
removes a roundtrip before client messages can arrive on the server.
- Browserchannel sessions have reconnect support. You should register
`socket.onconnecting = function() {...}` to send any messages which need to be
sent as the session is established. This will be called both when the socket is
first established *and* when the session reconnects.

---

# Caveats

- It doesn't do RPC.
- Currently there's no websocket support. So, its higher bandwidth on modern
browsers. On iOS you'll sometimes see a perpetual loading spinner in the top
black bar.

---

# How to rebuild the client

The client uses google's [closure library](https://developers.google.com/closure/library/)
& [compiler](https://developers.google.com/closure/compiler/). There's a couple small bugs that google
still hasn't fixed in their library (and probably never will), so I have a patch file kicking around.

Rebuilding the client library is annoying, so I keep an up to date compiled copy in `dist/`.

1. Download the closure library as a sibling of this repository

    ```
    cd ..
    git clone https://code.google.com/p/closure-library/
    git checkout -q df47692b1bacd494548a3b00b150d9f6a428d58a
    cd closure-library
    ```

2. Download the closure compiler

    ```
    curl http://dl.google.com/closure-compiler/compiler-latest.tar.gz > compiler-latest.tar.gz
    tar -xvf compiler-latest.tar.gz
    mv compiler-latest/compiler.jar .
    ```

3. Patch the library

    ```
    cd closure/
    patch -p0 < ../../node-browserchannel/closure-*.patch
    ```

4. Build

    ```
    cd ../../node-browserchannel
    make
    ```

## Caveats

### Java ~1.7 is a hard requirement.
Building this project with Java ~1.6 will fail, and may even fail silently.

### Known issue with latest closure-library.
Until [the bug][34] introduced in `closure-library#83c6a0b9`
is resolved upstream, use `closure-library#df47692`

[34]: https://github.com/josephg/node-browserchannel/issues/34

---

### License

Licensed under the standard MIT license:

Copyright 2011 Joseph Gentle.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

repository: azat-co/proexpressjs

gha_language: JavaScript

repo_name: azat-co/proexpressjs


text:
When checking if something is equal to one thing or another, you might think that this is possible:
```py
if favorite_fruit == 'grapefruit' or 'lemon':
    print("That's a weird favorite fruit to have.")
```
After all, that's how you would normally phrase it in plain English. In Python, however, you have to have _complete instructions on both sides of the logical operator_.

So, if you want to check if something is equal to one thing or another, there are two common ways:
```py
# Like this...
if favorite_fruit == 'grapefruit' or favorite_fruit == 'lemon':
    print("That's a weird favorite fruit to have.")

# ...or like this.
if favorite_fruit in ('grapefruit', 'lemon'):
    print("That's a weird favorite fruit to have.")
```

repository: pormes/bot

repo_name: pormes/bot


text:
# UpDNS
A load balanced DNS server with rule based checks for determining the status of potential server addresses

Configure the server by editing `records.json`

# Installation
Run `npm install`

# Starting the server
Run `node updns.js`

repository: MattFellows/UpDNS

repo_name: MattFellows/UpDNS


text:
---
title: Apache htpasswd tricks
---

Here are all kinds of examples of htpasswd files I use on a regular basis. Hopefully they can be useful for your application.

First thing is first for any htpasswd. You need the users so we will create them here. The secure location if up to you.

{% highlight text %}
htpasswd -c /var/www/.htpasswd first_usr
Adding user first_usr
New password:
Re-type new password:

htpasswd /var/www/.htpasswd second_usr
Adding user second_usr
New password:
Re-type new password:

htpasswd /var/www/.htpasswd subsequent_usr
Adding user subsequent_usr
New password:
Re-type new password:
{% endhighlight %}

Basic .htaccess file. Create this in the directory you want to protect. Once this is installed all directories below this one will be protected.

{% highlight text %}
AuthName "Password Protected"
AuthUserFile /var/www/.htpasswd
AuthType Basic
Require valid-user
{% endhighlight %}

Blocking all users except those who authenticate or come from one of the following IP address with the X-Forwarded-For header. This is great for those who have a load balancer in-front of their solution.

{% highlight text %}
AuthName "Password Protected"
AuthUserFile /var/www/.htpasswd
AuthType Basic
Require valid-user
Order deny,allow
Deny from all
SetEnvIf X-Forwarded-For "^10\.209\.146\.46" AllowAccess
SetEnvIf X-Forwarded-For "^10\.209\.132\.232" AllowAccess
SetEnvIf X-Forwarded-For "^10\.209\.251\.158" AllowAccess
SetEnvIf X-Forwarded-For "^10\.209\.160\.144" AllowAccess
Allow from env=AllowAccess
Satisfy Any
{% endhighlight %}

How about using MySQL for authentication? I am assuming you have Apache2 and MySQL/Percona/MariaDB already installed. We are only covering the installation of the Apache module, creating the tables and activating.

For Red Hat Enterprise Linux 6 and 7, CentOS 6 and 7, Fedora, Scientific Linux and all other RHEL 6 and 7 based distro’s.

{% highlight text %}
yum install mod_auth_mysql
{% endhighlight %}

For Debian, Ubunutu and other distro’s based on Debian.

{% highlight text %}
aptitude install libapache2-mod-auth-mysql
{% endhighlight %}

{% highlight text %}
mysql
mysql>CREATE DATABASE htpasswd-auth;
mysql>GRANT SELECT, INSERT, UPDATE, DELETE ON htpasswd-auth.* TO<EMAIL_ADDRESS>


text:
## REPOSITORY IS ARCHIVED

***The plugin is obsolete: TypeScript 4.x has adopted the extended semantic highlighting implemented by this plugin.
The repository is no longer maintained***

--------

A [TypeScript plugin](https://github.com/Microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin) that replaces `getEncodedSemanticClassifications` and `getEncodedSyntacticClassifications` to provide more classifications to be used by the new [Semantic Highlighting APIs](https://github.com/microsoft/vscode/wiki/Semantic-Highlighting-Overview) in VS Code.

The purpose of this plugin is to test and enable the new VS Code semantic highlight capabilities.

Once proven, the extended classifications will (hopefully) be adapted by the TypeScript language server and the plugin is no longer needed any more.

### New Classifications

The plugin uses new token classifications, consisting of a `TokenType` and with any number of `TokenModifier`s.

```
export const enum TokenType {
	class, enum, interface, namespace, typeParameter, type, parameter, variable, enumMember, property, function, member
}

export const enum TokenModifier {
	declaration, static, async, readonly, local, defaultLibrary
}
```

### Classification Encoding

The new classifications are retured in place of old the classifications. They are encoded as follows:
```
TSClassification = ((TokenType + 1) << 8) + TokenModifierSet;

```

All new classifications have a value >= 0x100 to not overlap with the old classifications. Old classifications are no longer emmitted once the plugin is active.

### Implemented Features

Examples for each feature can be seen in the [test cases](https://github.com/aeschli/typescript-vscode-sh-plugin/blob/master/src/test/semanticTokens.test.ts). To try them out in VSCode, copy the added snippet to a `TypeScript` editor and use the `Developer: Inspect Editor Tokens and Scopes` command to see the semantic token information ar the current cursor location.

- all token types listed above
  - classification for all declarations and references
  - modifier `declaration` when on the identifier of the declaration node
    ```
      class A { field: number; member(param: number) { let var= param + this.field; } }
    ```
  - modifier `defaultLibrary` when in an symbol that comes from the default libraries.
    ```
      Math.max(Number.Nan, parseInt('33'))
    ```
- variables, properties and parameters
  - modifier `readonly` when defined as `const` or `readonly`
    ```
      const var;
    ```
  - modifier `local` when not declared top-level
    ```
       function global(p: number) { const global;
    ```
- functions and members
  - modifier `async` when defined as `async`
  - modifier `static` when defined as `static`
-variables & properties with constructor signatures
  - variables & properties that have a constructor type, are classified as `class`
    ```
       Number.isInteger(1);
    ```
- variables & properties with call signatures
  - variables, properties and parameters that have a function type (but no properties) are classified as `function` resp `member` ([#89337](https://github.com/microsoft/vscode/issues/89337))
    ```
       const callback = () => {};
    ```
  - if the variable/member/parameter type is callable but also has properties, it stays a variable/member/parameter, unless used in a callExpression
    ```
       var fs = require('fs); require.resolve('foo/bar');
    ```
- jsx
  - no semantic highlighting for JSX element names (for now): [#88911](https://github.com/microsoft/vscode/issues/88911) [#89224](https://github.com/microsoft/vscode/issues/89224).

### Under discussion
- add `typeAlias` pas a new token type
- object literal keys are currently also classified as properties

### Try it out

#### In VS Code
- make sure semantic highlighting is enabled (on by default in insiders and since 1.43 in stable)
   `"editor.semanticHighlighting.enabled": true`
- open a TypeScript or JavaScript file in VSCode and wait for the language server to get active
- use the `Developer: Inspect Editor Tokens and Scopes` command to inspect the semantic information at a given cursor location.

![Inspect Editor Tokens](./images/inspect-tokens.png)

#### Run the Tests

- `yarn && yarn test` in the folder of the cloned repo.

repository: aeschli/typescript-vscode-sh-plugin

repo_name: aeschli/typescript-vscode-sh-plugin


text:
# Shell toolbox.
An [@alex-bv](https://github.com/alex-bv/) gists mirrror.

## Content table:
The following scripts are available:
| Filename: | Description: | OS: |
|-----------|--------------|-----|
| eraser.cmd | Free-space secure erase tool. | Windows |
| formatter.cmd | Secure drive formatter tool. | Windows |
| metadefender-scanner.ps1 | Metadefender file scan tool. | Windows |
| pip-updater.sh | Python-pip autoupdate tool. | Linux |

# GitHub Gist reference:
Description and step-by-step explanation available at:
- [eraser.cmd](https://gist.github.com/alex-bv/9e0102a002311b064d6d2309abefdde7)
- [formatter.cmd](https://gist.github.com/alex-bv/9e0102a002311b064d6d2309abefdde7)
- [metadefender-scanner.ps1](https://gist.github.com/alex-bv/61893112292709780680631d2e89ddee)
- [pip-updater.sh](https://gist.github.com/alex-bv/4c9427d964f5e60d41c005a931ae18bc)

repository: alex-bv/shell-toolbox

repo_name: alex-bv/shell-toolbox


text:
![test-again](test-again.png)

runs shell script functions as tests
====================================

[![Build Status](https://travis-ci.org/typedivision/test-again.svg?branch=master)](https://travis-ci.org/typedivision/test-again)<Paste>

**test-again** comes as a shell script to run functions of script files as tests
for any kind of programs. The test script files can be run individually or in a
batch format using **test-again** as command.

**test-again** generates [TAP](http://testanything.org/) compliant output.

## test script files

The `test-again` command runs script files defining the test cases.
Test scripts have the form of this `test_script` file:
```
#!/usr/bin/env sh          # works with bash, dash or busybox ash

LOG=/path/to/logdir        # define variables like in any other shell script

t_setup () {               # optional setup, 't_' is for test-again functions
  mkdir -p $LOG            # if setup fails, the test will fail immediately
}

t_teardown () {            # the optional teardown step is always executed
  log=$LOG/$t_TEST_NAME    # given test properties also have the prefix 't_'
  out=$t_TEST_TMP/out      # properties are available within function bodies
  if [ -e $out ]; then
    cp $out $log
  fi
}                          # for all tests, t_setup and t_teardown is called

test_pass () {             # the test functions follow the pattern 'test_*'
  return                   # return 0 to pass, otherwise the test fails
}

test_return_of_prog () {
  t_expect_ret prog 0      # use t_expect_* for reasonable output on failures
  prog >$t_TEST_TMP/out    # temporary dir t_TEST_TMP is created for each test
}

. test-again               # source test-again to run the tests
```

To run the tests, use any of
```
test-again test_script ... # run the test_script (and optionally more files)
./test_script              # run the test_script file as a single test
./test_script test_pass    # run a single test function from test_script
```

The output of the `test_script` is
```
1..2
ok 1 test_pass
ok 2 test_return_of_prog
```

And in case of `prog` fails
```
1..2
ok 1 test_pass
# expect_ret failed
#   prog
#  actual   1
#  expected 0
not ok 2 test_return_of_prog
```

## options

```
usage: test-again [-h|-l|-kvd] [-t <tmp-dir>] [<script> ...]

options:

  -h  print this help
  -l  list tests (don't run, just print)
  -k  keep (do not delete) the test dirs
  -v  verbose output (print stdout)
  -d  debug output (print shell traces)
  -t  set the tmp dir path (default ./tmp)
```

## test-again functions and properties

```
t_setup                      # test setup step called before each test
t_teardown                   # test teardown step called after each test

t_setup_once                 # setup step called once before all tests
t_teardown_once              # teardown step called once after all tests

t_skip [<reason>]            # skip the test with optional reason
t_bailout [<reason>]         # abort test execution with optional reason
t_subtest <file>             # run script file as subtest

t_call [-perr] <cmd>         # run <command> and save result in
                             # t_CALL_RET and t_CALL_OUT
                             # -perr includes stderr in t_CALL_OUT

t_expect_ret <cmd> <return>  # compare command exit code with <return>
t_expect_out <cmd> <output>  # compare command stdout with <output>
t_expect_eq '<exp>' <value>  # compare expression result and <value>

t_TEST_FILE                  # the name of the currently running test script
t_TEST_NAME                  # the actual test name (= test function name)
t_TEST_NUM                   # the actual test number
t_BASE_DIR                   # the shell working dir when calling the script
t_TEST_DIR                   # the directory containing this test script
t_BASE_TMP                   # a temparary dir for this test script under <tmp-dir>
t_TEST_TMP                   # a temparary dir for this test under t_BASE_TMP
```

## development

Clone the repo and run the tests
```
test/suite
```

To run the tests for different distributions (alpine, debian) and specific shells
(bash, dash, busybox ash), start the [docker](https://www.docker.com/) test script
```
test/docker/run-suite

# or run a single os/shell combination
test/docker/run-suite debian /bin/dash
```

## authors

The `test-again` script is initially based on the `ts` command
by Simon Chiang http://github.com/thinkerbot/ts

repository: typedivision/test-again

repo_name: typedivision/test-again


text:
---
title: Old LaTeX font references such as `\tenrm`
category: errors
tags: deprecated
permalink: /FAQ-oldfontnames
---

LaTeX 2.09 defined a large set of commands for access to the fonts
that it had built in to itself.  For example, `cmr` might
appear as `\fivrm`, `\sixrm`, `\sevrm`,
`\egtrm`, `\ninrm`, `\tenrm`, `\elvrm`, `\twlrm`,
`\frtnrm`, `\svtnrm`, `\twtyrm` and `\twfvrm`, according
to the size it's being typeset at.
These commands were never documented, but certain packages
nevertheless used them to achieve effects they needed.

Since the commands weren't public, they weren't included in LaTeX2e;
to use the unconverted LaTeX 2.09 packages under LaTeX2e, you need
also to include the [`rawfonts`](https://ctan.org/pkg/rawfonts) package (which is part of the
LaTeX2e distribution).


text:
---
title: Building ROOT
layout: single
sidebar:
  nav: "download"
toc: true
toc_sticky: true
---

## Supported platforms for building ROOT

- **freebsd7** for FreeBSD 7.x with gcc >= 4.8
- **linux** for i386 Linux with gcc >= 4.8
- **linuxx8664gcc** for x86-64 Linux with gcc >= 4.8
- **macosx** for MacOS X >= 10.8 with clang
- **openbsd** for OpenBSD >= 5.x with gcc >= 4.8

The compiler needs to support -std=c++11 to be able to build ROOT version 6.

See also → [Supported platforms]({{'/download/supported_platforms' | relative_url}}).

## Prerequisites for building ROOT

Depending on the used platform, some prerequisites must be met.

See → [Prerequisites]({{'/download/build_prerequisites' | relative_url}}).

## Building ROOT with CMake

ROOT uses the CMake cross-platform build-generator tool as a primary build system.

See → [Building ROOT with CMake]({{'/download/building_root' | relative_url}}).

## Building ROOT with make (old method)

The classic build with `configure/make` is is still available but it will not be evolving with the new features of ROOT.

See → [Building ROOT with make]({{'/download/building_root/build_root_old_method' | relative_url}}).

repository: Axel-Naumann/web

branch_name: refs/heads/gh-pages

repo_name: Axel-Naumann/web


text:
---
layout: post
title: The Wolf Report - June 7th, 2018
---

- [Visual Studio Code May 2018](https://code.visualstudio.com/updates/v1_24)
- [10 Things I Regret About Node.js - Ryan Dahl - JSConf EU 2018 - YouTube](https://www.youtube.com/watch?v=M3BM9TB-8yA)
- [Source Code Only NuGet Packages – Attila Hajdrik – Medium](https://medium.com/@attilah/source-code-only-nuget-packages-8f34a8fb4738)
- [The Book Is Ready (secretGeek.net)](http://secretgeek.net/yfp_out_now)
- [ASP.NET Community Standup - June 5, 2018 - ASP.NET Core 2.1 Release Party - YouTube](https://www.youtube.com/watch?v=LCV-JNOkZC4)


text:
# Tax Lien Sale Lists

## Dataset

| Name | Value |
| :--- | :---- |
| Catalog | [Link](https://catalog.data.gov/dataset/tax-lien-sale-lists) |
| Metadata | [Link](https://data.cityofnewyork.us/api/views/9rz4-mjek) |
| Data: JSON | [100 Rows](https://data.cityofnewyork.us/api/views/9rz4-mjek/rows.json?max_rows=100) |
| Data: CSV | [100 Rows](https://data.cityofnewyork.us/api/views/9rz4-mjek/rows.csv?max_rows=100) |
| Host | data.cityofnewyork.us |
| Id | 9rz4-mjek |
| Name | Tax Lien Sale Lists |
| Attribution | Department of Finance (DOF) |
| Category | City Government |
| Created | 2016-03-04T23:32:00Z |
| Publication Date | 2016-09-06T22:38:15Z |

## Description

Properties with tax and/or water liens that are potentially eligible to be included in the next lien sale.

## Columns

```ls
| Included | Schema Type    | Field Name       | Name             | Data Type     | Render Type   |
| ======== | ============== | ================ | ================ | ============= | ============= |
| Yes      | time           | month            | Month            | calendar_date | calendar_date |
| Yes      | numeric metric | borough          | Borough          | number        | number        |
| Yes      | series tag     | block            | Block            | text          | number        |
| Yes      | series tag     | lot              | Lot              | text          | number        |
| Yes      | series tag     | tax_class_code   | Tax Class Code   | text          | number        |
| Yes      | series tag     | building_class   | Building Class   | text          | text          |
| Yes      | numeric metric | community_board  | Community Board  | number        | number        |
| Yes      | series tag     | council_district | Council District | text          | number        |
| Yes      | series tag     | house_number     | House Number     | text          | text          |
| Yes      | series tag     | street_name      | Street Name      | text          | text          |
| Yes      | series tag     | zip_code         | Zip Code         | text          | text          |
| Yes      | series tag     | water_debt_only  | Water Debt Only  | text          | text          |
```

## Time Field

```ls
Value = month
Format & Zone = yyyy-MM-dd'T'HH:mm:ss
```

## Data Commands

```ls
series e:9rz4-mjek d:2016-03-01T00:00:00.000Z t:water_debt_only=YES t:house_number=22 t:zip_code=10004 t:street_name="BEAVER STREET" t:lot=11 t:block=11 t:council_district=1 t:building_class=K4 t:tax_class_code=4 m:borough=1 m:community_board=101

series e:9rz4-mjek d:2016-03-01T00:00:00.000Z t:water_debt_only=NO t:house_number=20 t:zip_code=10004 t:street_name="WEST STREET" t:lot=1285 t:block=15 t:council_district=3 t:building_class=R4 t:tax_class_code=2 m:borough=1 m:community_board=101

series e:9rz4-mjek d:2016-03-01T00:00:00.000Z t:water_debt_only=NO t:house_number=88 t:zip_code=10006 t:street_name="GREENWICH STREET" t:lot=1003 t:block=18 t:council_district=1 t:building_class=R4 t:tax_class_code=2 m:borough=1 m:community_board=101
```

## Meta Commands

```ls
metric m:borough p:integer l:Borough t:dataTypeName=number

metric m:community_board p:integer l:"Community Board" t:dataTypeName=number

entity e:9rz4-mjek l:"Tax Lien Sale Lists" t:attribution="Department of Finance (DOF)" t:url=https://data.cityofnewyork.us/api/views/9rz4-mjek

property e:9rz4-mjek t:meta.view v:id=9rz4-mjek v:category="City Government" v:averageRating=0 v:name="Tax Lien Sale Lists" v:attribution="Department of Finance (DOF)"

property e:9rz4-mjek t:meta.view.owner v:id=5fuc-pqz2 v:screenName="NYC OpenData" v:lastNotificationSeenAt=1491336998 v:displayName="NYC OpenData"

property e:9rz4-mjek t:meta.view.tableauthor v:id=5fuc-pqz2 v:screenName="NYC OpenData" v:roleName=administrator v:lastNotificationSeenAt=1491336998 v:displayName="NYC OpenData"
```

## Top Records

```ls
| month               | borough | block | lot  | tax_class_code | building_class | community_board | council_district | house_number | street_name      | zip_code | water_debt_only |
| =================== | ======= | ===== | ==== | ============== | ============== | =============== | ================ | ============ | ================ | ======== | =============== |
| 2016-03-01T00:00:00 | 1       | 11    | 11   | 4              | K4             | 101             | 1                | 22           | BEAVER STREET    | 10004    | YES             |
| 2016-03-01T00:00:00 | 1       | 15    | 1285 | 2              | R4             | 101             | 3                | 20           | WEST STREET      | 10004    | NO              |
| 2016-03-01T00:00:00 | 1       | 18    | 1003 | 2              | R4             | 101             | 1                | 88           | GREENWICH STREET | 10006    | NO              |
| 2016-03-01T00:00:00 | 1       | 18    | 1305 | 2              | R4             | 101             | 1                | 88           | GREENWICH STREET | 10006    | NO              |
| 2016-03-01T00:00:00 | 1       | 18    | 1405 | 2              | R4             | 101             | 1                | 88           | GREENWICH STREET | 10006    | NO              |
| 2016-03-01T00:00:00 | 1       | 18    | 1449 | 2              | R4             | 101             | 1                | 88           | GREENWICH STREET | 10006    | NO              |
| 2016-03-01T00:00:00 | 1       | 24    | 1005 | 2              | R4             | 101             | 1                | 40           | BROAD STREET     | 10004    | NO              |
| 2016-03-01T00:00:00 | 1       | 26    | 1272 | 2              | R4             | 101             | 1                | 15           | BROAD STREET     | 10005    | NO              |
| 2016-03-01T00:00:00 | 1       | 27    | 1055 | 2              | R4             | 101             | 1                | 55           | WALL STREET      | 10005    | NO              |
| 2016-03-01T00:00:00 | 1       | 28    | 1047 | 2              | R4             | 101             | 1                | 82           | BEAVER STREET    | 10005    | NO              |
```

repository: SpellarBot/open-data-catalog

repo_name: SpellarBot/open-data-catalog


text:
---
title: Recruiting for a Communications Lead!
---
Greetings Civic Hackers!

We are now recruiting for someone interested in being a part of the leadership team at Code for Boston as our Communications Lead. A job description is [linked here](https://www.codeforboston.org/communications-lead/). We are looking for a volunteer that is experienced in communications and excited about telling the stories of our project groups. If you have questions or want to learn more about this role feel free to reach out to us [via email](mailto:hello@codeforboston.org).

We also had a great partner interest lunch for folks interested in doing a project collaboration with us. We recorded and posted the [video of the presentation to our YouTube channel](https://youtu.be/fiG3OQ72e7E). Feel free to pass this along to friends or colleagues in any government or non-profit organization that might benefit from a collaboration with us!

What we’re reading & watching:
- [Apple is sticking taxpayers with part of the bill for the rollout of tech giant’s digital ID card](https://www.cnbc.com/2021/11/14/apple-sticking-taxpayers-with-part-of-the-bill-for-digital-id-rollout.html) via CNBC. A follow-up report on previous stories about Apple’s efforts around state IDs.

Matt & The Code for Boston Core Team

# Events

## [Civic Tech Coffee](https://codeforamerica.zoom.us/meeting/register/tJIud-Corj0sGNaJai1FmkyfRMek27MzEC_X)
Civic Tech Coffee is a monthly virtual event where individuals interested in Civic Tech can share what they are up to, meet other professionals in the field, and ask for help or ideas. Occasionally we host guest speakers or have other presentations which are announced ahead of time.

# Jobs

## [City of Boston - Wu Administration](https://www.allaboardboston.com/join-us)

Mayor-Elect Michelle Wu is collecting resumes for individuals interested in serving in her administration. If you have background in technology or software development you can submit your resume and check off “Technology” in the checkbox.

# Project Updates

## [Clean Slate](https://docs.google.com/forms/d/e/1FAIpQLSfZ18U2gHI97WqD-C63NvORCZu1vQX6hfLI4-1FOIA1neaaXw/viewform)
* App team had meeting with MRCC building relationship there and getting authentication working.
* Looking for: experience with WordPress.
* Data team working on preparing for the Middlesex analysis.

## [Police Data Trust](https://github.com/codeforboston/police-data-trust)
* Working on the end states of the user functions so users can create associations.
* Dealing with some scattered bugs.
* Working on a “Report a Problem” button.

## [Mattapan Mapping](https://github.com/codeforboston/mattapan-mapping)
* Having data discussions about managing data.
* Who on the client side is going to manage the data for boundaries, points, etc.
* Talking about how to setup infrastructure and backend for website.

## Windfall Awareness
* Had user testing session with a financial advisor.
* Hoping to continue to take lessons from the user testing. Reviewing and annotating the recording.


text:
# basster/cilex-elastica

[![Build Status](https://travis-ci.org/Basster/cilex-elastica.svg?branch=master)](https://travis-ci.org/Basster/cilex-elastica) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/d157422c-912c-4015-ac30-3b989181378f/mini.png)](https://insight.sensiolabs.com/projects/d157422c-912c-4015-ac30-3b989181378f)

This is a service provider for [Cilex](http://cilex.github.io/) which makes
access to [Elasticsearch](http://www.elasticsearch.org) available through
[Elastica](http://elastica.io).

This library is a Cilex adaptation of [easybib/silex-elastica](https://github.com/easybiblabs/silex-elastica).

## Getting Started

Set up the dependency on this package using [Composer](http://packagist.org/about-composer).
Once you have a Silex application skeleton you can register the service provider
and set Elastica options:

```php
$app->register(new Basster\Cilex\Elastica\Provider\ElasticaProvider(), [
    'elastica.client_options' => [
        'host' => 'localhost',
        'port' => 9200,
    ],
]);
```

The full set of options is available on the [Elastica documentation](http://elastica.io).

## License ##

The code is available under the [MIT](LICENSE) license.

repository: Basster/cilex-elastica

repo_name: Basster/cilex-elastica


text:
# Changelog

## [2.1.0] - 2021-07-19

### Added

- Support for DCAP SGX kernel driver.
- Support for DCAP Remote Attestation using ECDSA.

## [2.0.0] - 2021-04-19

### Changed

- Linux SGX version 2.12.

### Changed

- Target binutils version 2.35 or greater is required to support SGX 2.12.
- Yocto version 3.2 (Gagesgarth). Previous versions of Yocto are not supported.

## [1.5.0] - 2021-02-09

### Changed

- SGX kernel driver version 2.11.

## [1.4.0] - 2020-05-19

### Added

- Yocto version 3.1 (Dunfell).

## [1.3.0] - 2020-03-10

### Added

- Support for cached builds of ocaml

### Changed

- Fixed build for updated compiler version.

## [1.2.0] - 2019-12-09

### Changed

- SGX kernel driver version 2.6.

## [1.1.0] - 2019-07-10

### Changed

- Fix support for kernel driver 5.1.

## [1.0.0] - 2018-10-15

### Added

- Linux SGX version 2.2.
- Yocto version 2.5 (Sumo).

repository: intel/meta-intel-sgx

gha_language: BitBake

repo_name: intel/meta-intel-sgx


text:
# oktal
This aims to be an online calculator for developers, able to cope with C-like arithmetic/logical expressions.
## UI approach
You can input binary, octal, decimal or hexadecimal numbers using the four input fields on the left.

numeral system | input | output
--- | --- |---
binary | | |
octal | | |
decimal | | |
hexadecimal | | |

When we're able to evaluate your input, you'll see the result in those four numeral systems in the right column.

See at use at http://oktal.org/.

repository: linecker/oktal

repo_name: linecker/oktal